summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_tokens.py
diff options
context:
space:
mode:
authorHasan <hasan.r67@gmail.com>2016-01-17 14:56:39 +0330
committerTim Graham <timograham@gmail.com>2016-01-29 12:32:18 -0500
commit3d0dcd7f5af378d3ab6adb303b913e6c7b2e0ee5 (patch)
tree0d1074cc65a72096e44a4165611fddfc5b7ef7fb /tests/auth_tests/test_tokens.py
parent575706331bec4bf58ce36a9540c4c61fca49025b (diff)
Refs #26022 -- Used context manager version of assertRaises in tests.
Diffstat (limited to 'tests/auth_tests/test_tokens.py')
-rw-r--r--tests/auth_tests/test_tokens.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/auth_tests/test_tokens.py b/tests/auth_tests/test_tokens.py
index fa26f223f7..bddcd323d7 100644
--- a/tests/auth_tests/test_tokens.py
+++ b/tests/auth_tests/test_tokens.py
@@ -63,6 +63,5 @@ class TokenGeneratorTest(TestCase):
p0 = PasswordResetTokenGenerator()
# This will put a 14-digit base36 timestamp into the token, which is too large.
- self.assertRaises(ValueError,
- p0._make_token_with_timestamp,
- user, 175455491841851871349)
+ with self.assertRaises(ValueError):
+ p0._make_token_with_timestamp(user, 175455491841851871349)