summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Huot <jonathan.huot@thomsonreuters.com>2019-02-21 10:17:23 +0100
committerJonathan Huot <jonathan.huot@thomsonreuters.com>2019-07-04 11:14:50 +0200
commit87972cc4346a4c7b698fa1f026c76ddf717dec6b (patch)
tree4d1f2915ca8fe0efc0ce8347ac4c9d78bb8742fe
parentc17a4a25a71b3b342ad522427c23038f417fb22e (diff)
downloadoauthlib-87972cc4346a4c7b698fa1f026c76ddf717dec6b.tar.gz
Removed useless set_state internal function
Does not have purpose for /token request
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py b/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py
index c0cf86d..e7c66b6 100644
--- a/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py
+++ b/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py
@@ -29,12 +29,6 @@ class PreservationTest(TestCase):
self.web = WebApplicationServer(self.validator)
self.mobile = MobileApplicationServer(self.validator)
- def set_state(self, state):
- def set_request_state(client_id, code, client, request):
- request.state = state
- return True
- return set_request_state
-
def set_client(self, request):
request.client = mock.MagicMock()
request.client.client_id = 'mocked'
@@ -128,7 +122,7 @@ class PreservationTest(TestCase):
# was not given in the authorization AND not in the token request.
self.validator.confirm_redirect_uri.return_value = True
code = get_query_credentials(h['Location'])['code'][0]
- self.validator.validate_code.side_effect = self.set_state('xyz')
+ self.validator.validate_code.return_value = True
_, body, s = self.web.create_token_response(token_uri,
body='grant_type=authorization_code&code=%s' % code)
self.assertEqual(s, 200)