summary refs log tree commit diff
path: root/tests/api/test_auth.py
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-08-17 13:33:54 +0000
committerGitHub <noreply@github.com>2018-08-17 13:33:54 +0000
commit4c22b4047b53e36303c3513e21b3ba9b12ca14ce (patch)
treef0439ed7a668a2b0d627b78aaab25b03a2fb6514 /tests/api/test_auth.py
parentMerge pull request #3708 from matrix-org/neilj/resource_Limit_block_event_cre... (diff)
parentMerge branch 'neilj/limit_exceeded_error' of github.com:matrix-org/synapse in... (diff)
downloadsynapse-4c22b4047b53e36303c3513e21b3ba9b12ca14ce.tar.xz
Merge pull request #3707 from matrix-org/neilj/limit_exceeded_error
add new error type ResourceLimit
Diffstat (limited to 'tests/api/test_auth.py')
-rw-r--r--tests/api/test_auth.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/api/test_auth.py b/tests/api/test_auth.py
index 32a2b5fc3d..022d81ce3e 100644
--- a/tests/api/test_auth.py
+++ b/tests/api/test_auth.py
@@ -21,7 +21,7 @@ from twisted.internet import defer
 
 import synapse.handlers.auth
 from synapse.api.auth import Auth
-from synapse.api.errors import AuthError, Codes
+from synapse.api.errors import AuthError, Codes, ResourceLimitError
 from synapse.types import UserID
 
 from tests import unittest
@@ -455,7 +455,7 @@ class AuthTestCase(unittest.TestCase):
             return_value=defer.succeed(lots_of_users)
         )
 
-        with self.assertRaises(AuthError) as e:
+        with self.assertRaises(ResourceLimitError) as e:
             yield self.auth.check_auth_blocking()
         self.assertEquals(e.exception.admin_uri, self.hs.config.admin_uri)
         self.assertEquals(e.exception.errcode, Codes.RESOURCE_LIMIT_EXCEED)
@@ -471,7 +471,7 @@ class AuthTestCase(unittest.TestCase):
     def test_hs_disabled(self):
         self.hs.config.hs_disabled = True
         self.hs.config.hs_disabled_message = "Reason for being disabled"
-        with self.assertRaises(AuthError) as e:
+        with self.assertRaises(ResourceLimitError) as e:
             yield self.auth.check_auth_blocking()
         self.assertEquals(e.exception.admin_uri, self.hs.config.admin_uri)
         self.assertEquals(e.exception.errcode, Codes.RESOURCE_LIMIT_EXCEED)