Compare token expiry without seconds
There is a rounding problem that occurs periodically. Token expiration Does not need to be confirmed to this level of granularity. Bug 1045962 Change-Id: I361c5cf309c47b142c35c4359234fd0e44005e5a
This commit is contained in:
parent
f33e9f0279
commit
e94d2f9aa2
@ -392,9 +392,11 @@ class KeystoneClientTests(object):
|
||||
time.sleep(1.01)
|
||||
reauthenticated_token = foo_client.tokens.authenticate(
|
||||
token=foo_client.auth_token)
|
||||
#Don't compare seconds, as there is rounding error
|
||||
original = orig_token['expires'][:-3]
|
||||
reissued = reauthenticated_token.expires[:-3]
|
||||
|
||||
self.assertEquals(orig_token['expires'],
|
||||
reauthenticated_token.expires)
|
||||
self.assertEquals(original, reissued)
|
||||
|
||||
def test_user_create_update_delete(self):
|
||||
from keystoneclient import exceptions as client_exceptions
|
||||
|
Loading…
x
Reference in New Issue
Block a user