diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-11-13 10:33:32 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-11-13 14:22:23 +0100 |
| commit | ca0d50f34ad14be2eca3067011c659ef0e66a0bc (patch) | |
| tree | 417acdcf0ea83cdc8579e30e87707b177f19cbdf /tests/auth_tests/test_tokens.py | |
| parent | 3b4b36fb1d6c9dad80dce8ec2dbf77d269f3d0e7 (diff) | |
Fixed random auth_tests.test_tokens.TokenGeneratorTest.test_10265 failures.
Random failures depended on the current timestamp.
Diffstat (limited to 'tests/auth_tests/test_tokens.py')
| -rw-r--r-- | tests/auth_tests/test_tokens.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/auth_tests/test_tokens.py b/tests/auth_tests/test_tokens.py index 5db97c3bf5..806abd3efe 100644 --- a/tests/auth_tests/test_tokens.py +++ b/tests/auth_tests/test_tokens.py @@ -27,12 +27,11 @@ class TokenGeneratorTest(TestCase): The token generated for a user created in the same request will work correctly. """ - # See ticket #10265 user = User.objects.create_user('comebackkid', 'test3@example.com', 'testpw') - p0 = PasswordResetTokenGenerator() + user_reload = User.objects.get(username='comebackkid') + p0 = MockedPasswordResetTokenGenerator(datetime.now()) tk1 = p0.make_token(user) - reload = User.objects.get(username='comebackkid') - tk2 = p0.make_token(reload) + tk2 = p0.make_token(user_reload) self.assertEqual(tk1, tk2) def test_timeout(self): |
