summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-05-20 00:26:52 +0000
committerGerrit Code Review <review@openstack.org>2020-05-20 00:26:52 +0000
commitb74e95c27fff46a3abf661fd6348b604cabf47db (patch)
treee77b2392eea0b634acad54c74e0749283cfd987a
parent63caf56bdb9d9ff8e515bb26a3f07cdbcdb6514e (diff)
parent247227f3f367be37db3292ecae130e3e02f18063 (diff)
downloadkeystone-b74e95c27fff46a3abf661fd6348b604cabf47db.tar.gz
Merge "Change time faking for totp test" into stable/train
-rw-r--r--keystone/tests/unit/test_v3_auth.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/keystone/tests/unit/test_v3_auth.py b/keystone/tests/unit/test_v3_auth.py
index 6d6c6f649..278d7f6e7 100644
--- a/keystone/tests/unit/test_v3_auth.py
+++ b/keystone/tests/unit/test_v3_auth.py
@@ -5306,9 +5306,9 @@ class TestAuthTOTP(test_v3.RestfulTestCase):
secret = creds[-1]['blob']
past = datetime.datetime.utcnow() - datetime.timedelta(minutes=2)
- with freezegun.freeze_time(past):
- auth_data = self._make_auth_data_by_id(
- totp._generate_totp_passcodes(secret)[0])
+ self.useFixture(fixture.TimeFixture(past))
+ auth_data = self._make_auth_data_by_id(
+ totp._generate_totp_passcodes(secret)[0])
# Stop the clock otherwise there is a chance of auth failure due to
# getting a different TOTP between the call here and the call in the