summary refs log tree commit diff
path: root/tests/server_notices/test_resource_limits_server_notices.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-05-06 15:07:28 +0100
committerErik Johnston <erik@matrix.org>2021-05-06 15:07:28 +0100
commite11cd368b73658b51dcfba483db8f0af0979e071 (patch)
treeeca9d8a38eb32aa3d0893129f2db5090e9cc03a1 /tests/server_notices/test_resource_limits_server_notices.py
parentMerge remote-tracking branch 'origin/develop' into matrix-org-hotfixes (diff)
parentRevert "Leave out optional keys from /sync (#9919)" (#9940) (diff)
downloadsynapse-e11cd368b73658b51dcfba483db8f0af0979e071.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'tests/server_notices/test_resource_limits_server_notices.py')
-rw-r--r--tests/server_notices/test_resource_limits_server_notices.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/server_notices/test_resource_limits_server_notices.py b/tests/server_notices/test_resource_limits_server_notices.py

index 3245aa91ca..d46521ccdc 100644 --- a/tests/server_notices/test_resource_limits_server_notices.py +++ b/tests/server_notices/test_resource_limits_server_notices.py
@@ -306,9 +306,8 @@ class TestResourceLimitsServerNoticesWithRealRooms(unittest.HomeserverTestCase): channel = self.make_request("GET", "/sync?timeout=0", access_token=tok) - self.assertNotIn( - "rooms", channel.json_body, "Got invites without server notice" - ) + invites = channel.json_body["rooms"]["invite"] + self.assertEqual(len(invites), 0, invites) def test_invite_with_notice(self): """Tests that, if the MAU limit is hit, the server notices user invites each user @@ -365,8 +364,7 @@ class TestResourceLimitsServerNoticesWithRealRooms(unittest.HomeserverTestCase): # We could also pick another user and sync with it, which would return an # invite to a system notices room, but it doesn't matter which user we're # using so we use the last one because it saves us an extra sync. - if "rooms" in channel.json_body: - invites = channel.json_body["rooms"]["invite"] + invites = channel.json_body["rooms"]["invite"] # Make sure we have an invite to process. self.assertEqual(len(invites), 1, invites)