summary refs log tree commit diff
path: root/tests/api/test_auth.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-05-13 14:46:53 +0100
committerErik Johnston <erik@matrix.org>2016-05-13 14:46:53 +0100
commit99b5a2e560d28894710e1bebaa1977cfebc7963d (patch)
tree88e0f3de599addc0a129d3c94212aef674c5c24d /tests/api/test_auth.py
parentMerge pull request #778 from matrix-org/erikj/add_pusher (diff)
parentCreate user with expiry (diff)
downloadsynapse-99b5a2e560d28894710e1bebaa1977cfebc7963d.tar.xz
Merge pull request #741 from negzi/create_user_with_expiry
Create user with expiry
Diffstat (limited to 'tests/api/test_auth.py')
-rw-r--r--tests/api/test_auth.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/api/test_auth.py b/tests/api/test_auth.py
index 7e7b0b4b1d..ad269af0ec 100644
--- a/tests/api/test_auth.py
+++ b/tests/api/test_auth.py
@@ -284,12 +284,12 @@ class AuthTestCase(unittest.TestCase):
         macaroon.add_first_party_caveat("time < 1")  # ms
 
         self.hs.clock.now = 5000  # seconds
-
-        yield self.auth.get_user_from_macaroon(macaroon.serialize())
+        self.hs.config.expire_access_token = True
+        # yield self.auth.get_user_from_macaroon(macaroon.serialize())
         # TODO(daniel): Turn on the check that we validate expiration, when we
         # validate expiration (and remove the above line, which will start
         # throwing).
-        # with self.assertRaises(AuthError) as cm:
-        #     yield self.auth.get_user_from_macaroon(macaroon.serialize())
-        # self.assertEqual(401, cm.exception.code)
-        # self.assertIn("Invalid macaroon", cm.exception.msg)
+        with self.assertRaises(AuthError) as cm:
+            yield self.auth.get_user_from_macaroon(macaroon.serialize())
+        self.assertEqual(401, cm.exception.code)
+        self.assertIn("Invalid macaroon", cm.exception.msg)