diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-03-06 10:55:22 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-03-06 10:55:22 +0000 |
commit | f4195f41188928b8da9bed38c60e221466274a48 (patch) | |
tree | efa19628c1b2449e9e1fe2f1d0ee4aafebcee1ba /tests | |
parent | Add changelog (diff) | |
download | synapse-f4195f41188928b8da9bed38c60e221466274a48.tar.xz |
Revert "Split ratelimiters in two (one for events, one for registration)"
This reverts commit d7dbad3526136cfc9fdbd568635be5016fb637db.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/handlers/test_profile.py | 2 | ||||
-rw-r--r-- | tests/replication/slave/storage/_base.py | 2 | ||||
-rw-r--r-- | tests/rest/client/v1/test_events.py | 2 | ||||
-rw-r--r-- | tests/rest/client/v1/test_typing.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/handlers/test_profile.py b/tests/handlers/test_profile.py index 905816a44b..d60c124eec 100644 --- a/tests/handlers/test_profile.py +++ b/tests/handlers/test_profile.py @@ -58,7 +58,7 @@ class ProfileTestCase(unittest.TestCase): ratelimiter=NonCallableMock(spec_set=["can_do_action"]), ) - self.ratelimiter = hs.get_events_ratelimiter() + self.ratelimiter = hs.get_ratelimiter() self.ratelimiter.can_do_action.return_value = (True, 0) self.store = hs.get_datastore() diff --git a/tests/replication/slave/storage/_base.py b/tests/replication/slave/storage/_base.py index b293e04355..524af4f8d1 100644 --- a/tests/replication/slave/storage/_base.py +++ b/tests/replication/slave/storage/_base.py @@ -34,7 +34,7 @@ class BaseSlavedStoreTestCase(unittest.HomeserverTestCase): ratelimiter=NonCallableMock(spec_set=["can_do_action"]), ) - hs.get_events_ratelimiter().can_do_action.return_value = (True, 0) + hs.get_ratelimiter().can_do_action.return_value = (True, 0) return hs diff --git a/tests/rest/client/v1/test_events.py b/tests/rest/client/v1/test_events.py index cd328dc5f1..36d8547275 100644 --- a/tests/rest/client/v1/test_events.py +++ b/tests/rest/client/v1/test_events.py @@ -42,7 +42,7 @@ class EventStreamPermissionsTestCase(unittest.HomeserverTestCase): hs = self.setup_test_homeserver( config=config, ratelimiter=NonCallableMock(spec_set=["can_do_action"]) ) - self.ratelimiter = hs.get_events_ratelimiter() + self.ratelimiter = hs.get_ratelimiter() self.ratelimiter.can_do_action.return_value = (True, 0) hs.get_handlers().federation_handler = Mock() diff --git a/tests/rest/client/v1/test_typing.py b/tests/rest/client/v1/test_typing.py index 2e2e314a49..30fb77bac8 100644 --- a/tests/rest/client/v1/test_typing.py +++ b/tests/rest/client/v1/test_typing.py @@ -47,7 +47,7 @@ class RoomTypingTestCase(unittest.HomeserverTestCase): self.event_source = hs.get_event_sources().sources["typing"] - self.ratelimiter = hs.get_events_ratelimiter() + self.ratelimiter = hs.get_ratelimiter() self.ratelimiter.can_do_action.return_value = (True, 0) hs.get_handlers().federation_handler = Mock() |