summary refs log tree commit diff
path: root/tests/handlers/test_sync.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/handlers/test_sync.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/handlers/test_sync.py')
-rw-r--r--tests/handlers/test_sync.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/handlers/test_sync.py b/tests/handlers/test_sync.py
index 33d861bd64..a01ab471f5 100644
--- a/tests/handlers/test_sync.py
+++ b/tests/handlers/test_sync.py
@@ -14,7 +14,7 @@
 # limitations under the License.
 from twisted.internet import defer
 
-from synapse.api.errors import AuthError, Codes
+from synapse.api.errors import Codes, ResourceLimitError
 from synapse.api.filtering import DEFAULT_FILTER_COLLECTION
 from synapse.handlers.sync import SyncConfig, SyncHandler
 from synapse.types import UserID
@@ -49,7 +49,7 @@ class SyncTestCase(tests.unittest.TestCase):
 
         # Test that global lock works
         self.hs.config.hs_disabled = True
-        with self.assertRaises(AuthError) as e:
+        with self.assertRaises(ResourceLimitError) as e:
             yield self.sync_handler.wait_for_sync_for_user(sync_config)
         self.assertEquals(e.exception.errcode, Codes.RESOURCE_LIMIT_EXCEED)
 
@@ -57,7 +57,7 @@ class SyncTestCase(tests.unittest.TestCase):
 
         sync_config = self._generate_sync_config(user_id2)
 
-        with self.assertRaises(AuthError) as e:
+        with self.assertRaises(ResourceLimitError) as e:
             yield self.sync_handler.wait_for_sync_for_user(sync_config)
         self.assertEquals(e.exception.errcode, Codes.RESOURCE_LIMIT_EXCEED)