@@ -283,12 +283,12 @@ def test_access_token_no_code(self, requests):
283
283
def test_access_token_response (self , requests ):
284
284
"Return full response text without parsing key/secret."
285
285
response = Mock ()
286
- response .text = 'access_token=USER_ACESS_TOKEN '
286
+ response .text = 'access_token=USER_ACCESS_TOKEN '
287
287
requests .return_value = response
288
288
request = self .factory .get ('/callback/' , {'code' : 'code' , 'state' : 'foo' })
289
289
request .session = {self .oauth .session_key : 'foo' }
290
290
token = self .oauth .get_access_token (request )
291
- self .assertEqual (token , 'access_token=USER_ACESS_TOKEN ' )
291
+ self .assertEqual (token , 'access_token=USER_ACCESS_TOKEN ' )
292
292
293
293
def test_access_token_failure (self , requests ):
294
294
"Handle upstream server errors when fetching access token."
@@ -300,15 +300,15 @@ def test_access_token_failure(self, requests):
300
300
301
301
def test_profile_info_auth (self , requests ):
302
302
"Pass access token when requesting profile info."
303
- raw_token = 'access_token=USER_ACESS_TOKEN '
303
+ raw_token = 'access_token=USER_ACCESS_TOKEN '
304
304
self .oauth .get_profile_info (raw_token )
305
305
self .assertTrue (requests .called )
306
306
args , kwargs = requests .call_args
307
- self .assertEqual (kwargs ['params' ]['access_token' ], 'USER_ACESS_TOKEN ' )
307
+ self .assertEqual (kwargs ['params' ]['access_token' ], 'USER_ACCESS_TOKEN ' )
308
308
309
309
def test_profile_info_url (self , requests ):
310
310
"Make get request for profile url."
311
- raw_token = 'access_token=USER_ACESS_TOKEN '
311
+ raw_token = 'access_token=USER_ACCESS_TOKEN '
312
312
self .oauth .get_profile_info (raw_token )
313
313
self .assertTrue (requests .called )
314
314
args , kwargs = requests .call_args
@@ -319,15 +319,15 @@ def test_profile_info_url(self, requests):
319
319
def test_profile_info_failure (self , requests ):
320
320
"Handle upstream server errors when fetching profile info."
321
321
requests .side_effect = RequestException ('Server Down' )
322
- raw_token = 'access_token=USER_ACESS_TOKEN '
322
+ raw_token = 'access_token=USER_ACCESS_TOKEN '
323
323
response = self .oauth .get_profile_info (raw_token )
324
324
self .assertEqual (response , None )
325
325
326
326
def test_parse_token_response_json (self , requests ):
327
327
"Parse token response which is JSON encoded per spec."
328
- raw_token = '{"access_token": "USER_ACESS_TOKEN "}'
328
+ raw_token = '{"access_token": "USER_ACCESS_TOKEN "}'
329
329
token , secret = self .oauth .parse_raw_token (raw_token )
330
- self .assertEqual (token , 'USER_ACESS_TOKEN ' )
330
+ self .assertEqual (token , 'USER_ACCESS_TOKEN ' )
331
331
self .assertEqual (secret , None )
332
332
333
333
def test_parse_error_response_json (self , requests ):
@@ -339,9 +339,9 @@ def test_parse_error_response_json(self, requests):
339
339
340
340
def test_parse_token_response_query (self , requests ):
341
341
"Parse token response which is url encoded (FB)."
342
- raw_token = 'access_token=USER_ACESS_TOKEN '
342
+ raw_token = 'access_token=USER_ACCESS_TOKEN '
343
343
token , secret = self .oauth .parse_raw_token (raw_token )
344
- self .assertEqual (token , 'USER_ACESS_TOKEN ' )
344
+ self .assertEqual (token , 'USER_ACCESS_TOKEN ' )
345
345
self .assertEqual (secret , None )
346
346
347
347
def test_parse_invalid_token_response (self , requests ):
@@ -377,9 +377,9 @@ def test_access_token_state_incorrect(self, requests):
377
377
378
378
def test_request_with_user_token (self , requests ):
379
379
"Use token for request auth."
380
- token = '{"access_token": "USER_ACESS_TOKEN "}'
380
+ token = '{"access_token": "USER_ACCESS_TOKEN "}'
381
381
self .oauth = self .oauth_client (self .provider , token = token )
382
382
self .oauth .request ('get' , 'http://example.com/' )
383
383
self .assertTrue (requests .called )
384
384
args , kwargs = requests .call_args
385
- self .assertEqual (kwargs ['params' ]['access_token' ], 'USER_ACESS_TOKEN ' )
385
+ self .assertEqual (kwargs ['params' ]['access_token' ], 'USER_ACCESS_TOKEN ' )
0 commit comments