summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Lennox <jamielennox@redhat.com>2015-03-11 05:32:33 +1100
committerJamie Lennox <jamielennox@redhat.com>2015-03-11 05:32:33 +1100
commit932e6d551068b0a1956d0d8dd6af85513bb96587 (patch)
tree5aa47b8255ea0ca12cde4a5f748f2bdaef657e9b
parentd403c341323970a8d634c7379eba75c7d016a899 (diff)
downloadpython-keystoneclient-932e6d551068b0a1956d0d8dd6af85513bb96587.tar.gz
Fix time issue in AccessInfo test
I've only seen this happen once, however by making the token expiry 5 minutes in the future, then checking that it wont have expired in 300 seconds means that if the test happens all on the same second boundary then the test will fail. Just increase the time we're checking for by a second to ensure it doesn't happen. Change-Id: Iadeadfbacaf6f1b939c237919b52445c60c9bdd0
-rw-r--r--keystoneclient/tests/unit/v3/test_access.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/keystoneclient/tests/unit/v3/test_access.py b/keystoneclient/tests/unit/v3/test_access.py
index d3107af..5e4a949 100644
--- a/keystoneclient/tests/unit/v3/test_access.py
+++ b/keystoneclient/tests/unit/v3/test_access.py
@@ -76,7 +76,7 @@ class AccessInfoTest(utils.TestCase):
auth_ref = access.AccessInfo.factory(resp=TOKEN_RESPONSE,
body=UNSCOPED_TOKEN)
self.assertFalse(auth_ref.will_expire_soon(stale_duration=120))
- self.assertTrue(auth_ref.will_expire_soon(stale_duration=300))
+ self.assertTrue(auth_ref.will_expire_soon(stale_duration=301))
self.assertFalse(auth_ref.will_expire_soon())
def test_building_domain_scoped_accessinfo(self):