summary refs log tree commit diff
path: root/tests/api
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-05-16 12:59:41 +0100
committerMark Haines <mark.haines@matrix.org>2016-05-16 12:59:41 +0100
commitdd95eb4cb5f1519bfd328249f97f8731c4a11b64 (patch)
tree96220dc54d2d6d0b36999c5c01db8d5f5b13b851 /tests/api
parentadd a url_preview_ip_range_whitelist config param so we can whitelist the mat... (diff)
parentfix logo (diff)
downloadsynapse-dd95eb4cb5f1519bfd328249f97f8731c4a11b64.tar.xz
Merge branch 'develop' into matthew/preview_url_ip_whitelist
Diffstat (limited to 'tests/api')
-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)