Merge "Change time faking for totp test"
This commit is contained in:
commit
bf9f5dec55
|
@ -5304,9 +5304,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
|
||||
|
|
Loading…
Reference in New Issue