summaryrefslogtreecommitdiff
path: root/tests
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-02-21 10:17:23 +0100
commit2904de612a5e52c14776978dd5a31cdde2bfc34e (patch)
treefa82d70ef532771e15167b8f695a95f982abddf1 /tests
parent4205dc1b4240e30d966c3fd4fe872f83413b2e2c (diff)
downloadoauthlib-2904de612a5e52c14776978dd5a31cdde2bfc34e.tar.gz
Removed useless set_state internal function
Does not have purpose for /token request
Diffstat (limited to 'tests')
-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)