diff options
author | Jonathan Huot <jonathan.huot@thomsonreuters.com> | 2019-03-26 16:32:51 +0100 |
---|---|---|
committer | Jonathan Huot <jonathan.huot@thomsonreuters.com> | 2019-03-26 16:32:51 +0100 |
commit | ed8c4f253def93a0d4d78a6ead1a63091f8e4c26 (patch) | |
tree | 188a1821a6b895359a9ab5686981533cfffc50d1 /tests/openid | |
parent | 09538c93d562f6230f3d257b6782d58eeb0a7c3e (diff) | |
download | oauthlib-ed8c4f253def93a0d4d78a6ead1a63091f8e4c26.tar.gz |
Python2.7 compatible
Diffstat (limited to 'tests/openid')
-rw-r--r-- | tests/openid/connect/core/grant_types/test_base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/openid/connect/core/grant_types/test_base.py b/tests/openid/connect/core/grant_types/test_base.py index 319904b..76e017f 100644 --- a/tests/openid/connect/core/grant_types/test_base.py +++ b/tests/openid/connect/core/grant_types/test_base.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -import datetime import mock +import time from oauthlib.common import Request from oauthlib.openid.connect.core.grant_types.base import GrantTypeBase @@ -68,7 +68,7 @@ class IDTokenTest(TestCase): self.assertEqual(token["id_token"], "eyJ.body.signature") id_token = self.mock_validator.finalize_id_token.call_args[0][0] self.assertEqual(id_token['aud'], 'abcdef') - self.assertGreaterEqual(id_token['iat'], int(datetime.datetime.now().timestamp())) + self.assertGreaterEqual(id_token['iat'], int(time.time())) def test_finalize_id_token_with_nonce(self): token = self.grant.add_id_token(self.token, "token_handler_mock", self.request, "my_nonce") |