diff options
author | Neil Johnson <neil@matrix.org> | 2018-08-17 13:33:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-17 13:33:54 +0000 |
commit | 4c22b4047b53e36303c3513e21b3ba9b12ca14ce (patch) | |
tree | f0439ed7a668a2b0d627b78aaab25b03a2fb6514 /tests/handlers/test_auth.py | |
parent | Merge pull request #3708 from matrix-org/neilj/resource_Limit_block_event_cre... (diff) | |
parent | Merge branch 'neilj/limit_exceeded_error' of github.com:matrix-org/synapse in... (diff) | |
download | synapse-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_auth.py')
-rw-r--r-- | tests/handlers/test_auth.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/handlers/test_auth.py b/tests/handlers/test_auth.py index 3046bd6093..1e39fe0ec2 100644 --- a/tests/handlers/test_auth.py +++ b/tests/handlers/test_auth.py @@ -20,7 +20,7 @@ from twisted.internet import defer import synapse import synapse.api.errors -from synapse.api.errors import AuthError +from synapse.api.errors import ResourceLimitError from synapse.handlers.auth import AuthHandler from tests import unittest @@ -130,13 +130,13 @@ class AuthTestCase(unittest.TestCase): return_value=defer.succeed(self.large_number_of_users) ) - with self.assertRaises(AuthError): + with self.assertRaises(ResourceLimitError): yield self.auth_handler.get_access_token_for_user_id('user_a') self.hs.get_datastore().get_monthly_active_count = Mock( return_value=defer.succeed(self.large_number_of_users) ) - with self.assertRaises(AuthError): + with self.assertRaises(ResourceLimitError): yield self.auth_handler.validate_short_term_login_token_and_get_user_id( self._get_macaroon().serialize() ) @@ -149,13 +149,13 @@ class AuthTestCase(unittest.TestCase): self.hs.get_datastore().get_monthly_active_count = Mock( return_value=defer.succeed(self.hs.config.max_mau_value) ) - with self.assertRaises(AuthError): + with self.assertRaises(ResourceLimitError): yield self.auth_handler.get_access_token_for_user_id('user_a') self.hs.get_datastore().get_monthly_active_count = Mock( return_value=defer.succeed(self.hs.config.max_mau_value) ) - with self.assertRaises(AuthError): + with self.assertRaises(ResourceLimitError): yield self.auth_handler.validate_short_term_login_token_and_get_user_id( self._get_macaroon().serialize() ) |