diff options
author | Erik Johnston <erik@matrix.org> | 2018-08-22 17:00:29 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-08-22 17:00:29 +0100 |
commit | 9643a6f7f208f52febc4be7edb1e38f4ff077b4d (patch) | |
tree | bbdee545550e19b7e9e5cdfcb0fcece2737388c3 /tests/server_notices | |
parent | rename error code (diff) | |
download | synapse-9643a6f7f208f52febc4be7edb1e38f4ff077b4d.tar.xz |
Update notice format
Diffstat (limited to 'tests/server_notices')
-rw-r--r-- | tests/server_notices/test_resource_limits_server_notices.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/server_notices/test_resource_limits_server_notices.py b/tests/server_notices/test_resource_limits_server_notices.py index cc8d2f539c..ca9b31128a 100644 --- a/tests/server_notices/test_resource_limits_server_notices.py +++ b/tests/server_notices/test_resource_limits_server_notices.py @@ -2,7 +2,7 @@ from mock import Mock from twisted.internet import defer -from synapse.api.constants import EventTypes +from synapse.api.constants import EventTypes, ServerNoticeMsgType from synapse.api.errors import ResourceLimitError from synapse.handlers.auth import AuthHandler from synapse.server_notices.resource_limits_server_notices import ( @@ -78,7 +78,10 @@ class TestResourceLimitsServerNotices(unittest.TestCase): """Test when user has blocked notice, but should have it removed""" self._rlsn._auth.check_auth_blocking = Mock() - mock_event = Mock(type=EventTypes.ServerNoticeLimitReached) + mock_event = Mock( + type=EventTypes.Message, + content={"msgtype": ServerNoticeMsgType}, + ) self._rlsn._store.get_events = Mock(return_value=defer.succeed( {"123": mock_event} )) @@ -94,7 +97,10 @@ class TestResourceLimitsServerNotices(unittest.TestCase): side_effect=ResourceLimitError(403, 'foo') ) - mock_event = Mock(type=EventTypes.ServerNoticeLimitReached) + mock_event = Mock( + type=EventTypes.Message, + content={"msgtype": ServerNoticeMsgType}, + ) self._rlsn._store.get_events = Mock(return_value=defer.succeed( {"123": mock_event} )) |