diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-07-27 13:18:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 17:18:41 +0000 |
commit | 922b771337f6d14a556fa761c783748f698e924b (patch) | |
tree | 7ee9ff2cdca63b9c912c818902009870ae93a90d /tests/rest | |
parent | Implement MSC3848: Introduce errcodes for specific event sending failures (#1... (diff) | |
download | synapse-922b771337f6d14a556fa761c783748f698e924b.tar.xz |
Add missing type hints for tests.unittest. (#13397)
Diffstat (limited to 'tests/rest')
-rw-r--r-- | tests/rest/client/test_relations.py | 6 | ||||
-rw-r--r-- | tests/rest/client/test_rooms.py | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/rest/client/test_relations.py b/tests/rest/client/test_relations.py index ad03eee17b..d589f07314 100644 --- a/tests/rest/client/test_relations.py +++ b/tests/rest/client/test_relations.py @@ -1060,6 +1060,7 @@ class BundledAggregationsTestCase(BaseRelationsTestCase): participated, bundled_aggregations.get("current_user_participated") ) # The latest thread event has some fields that don't matter. + self.assertIn("latest_event", bundled_aggregations) self.assert_dict( { "content": { @@ -1072,7 +1073,7 @@ class BundledAggregationsTestCase(BaseRelationsTestCase): "sender": self.user2_id, "type": "m.room.test", }, - bundled_aggregations.get("latest_event"), + bundled_aggregations["latest_event"], ) return assert_thread @@ -1112,6 +1113,7 @@ class BundledAggregationsTestCase(BaseRelationsTestCase): self.assertEqual(2, bundled_aggregations.get("count")) self.assertTrue(bundled_aggregations.get("current_user_participated")) # The latest thread event has some fields that don't matter. + self.assertIn("latest_event", bundled_aggregations) self.assert_dict( { "content": { @@ -1124,7 +1126,7 @@ class BundledAggregationsTestCase(BaseRelationsTestCase): "sender": self.user_id, "type": "m.room.test", }, - bundled_aggregations.get("latest_event"), + bundled_aggregations["latest_event"], ) # Check the unsigned field on the latest event. self.assert_dict( diff --git a/tests/rest/client/test_rooms.py b/tests/rest/client/test_rooms.py index c45cb32090..2272d55d84 100644 --- a/tests/rest/client/test_rooms.py +++ b/tests/rest/client/test_rooms.py @@ -496,7 +496,7 @@ class RoomStateTestCase(RoomBase): self.assertEqual(HTTPStatus.OK, channel.code, msg=channel.result["body"]) self.assertCountEqual( - [state_event["type"] for state_event in channel.json_body], + [state_event["type"] for state_event in channel.json_list], { "m.room.create", "m.room.power_levels", |