def test_request_token_unsupported_headers(self):
        # Rogue oauth param added
        oauth_header_request_token_params = "OAuth realm=\"test\","\
               "oauth_consumer_key=\"%s\","\
               "this_is_not_good=\"blah\","\
               "oauth_signature_method=\"HMAC-SHA1\","\
               "oauth_timestamp=\"%s\","\
               "oauth_nonce=\"requestnonce\","\
               "oauth_version=\"1.0\","\
               "oauth_callback=\"http://example.com/request_token_ready\"" % (self.consumer.key,str(int(time.time())))

        # Make string params into dictionary for from_consumer_and_token function        
        request_token_param_list = oauth_header_request_token_params.split(",")
        oauth_header_request_token_params_dict = {}
        for p in request_token_param_list:
            item = p.split("=")
            oauth_header_request_token_params_dict[str(item[0]).strip()] = str(item[1]).strip('"')

        # Create oauth request and signature
        oauth_request = oauth.Request.from_consumer_and_token(self.consumer, token=None, http_method='GET',
            http_url=INITIATE_ENDPOINT, parameters=oauth_header_request_token_params_dict)
        signature_method = oauth.SignatureMethod_HMAC_SHA1()
        signature = signature_method.sign(oauth_request, self.consumer, None)
       
       # Append signature
        oauth_header_request_token_params = oauth_header_request_token_params + ",oauth_signature=%s" % signature
        
        resp = self.client.get(INITIATE_ENDPOINT)
        self.assertEqual(resp.status_code, 400)
        self.assertEqual(resp.content, 'Invalid request parameters.')
dataset/ETHPy150Open adlnet/ADL_LRS/lrs/tests/test_OAuth.py/OAuthTests.test_request_token_unsupported_headers/original