summary refs log tree commit diff
path: root/tests/storage/test_room.py
diff options
context:
space:
mode:
authorV02460 <V02460@gmail.com>2023-08-25 21:05:10 +0200
committerGitHub <noreply@github.com>2023-08-25 15:05:10 -0400
commit84f441f88f51d3f94e1616e1e5507df0dadb6de8 (patch)
tree717bc7464290b887d2e2c355659104d5b7613972 /tests/storage/test_room.py
parentservice-identity, incremental, and setuptools-rust now have type hints. (#16186) (diff)
downloadsynapse-84f441f88f51d3f94e1616e1e5507df0dadb6de8.tar.xz
Prepare unit tests for Python 3.12 (#16099)
Diffstat (limited to 'tests/storage/test_room.py')
-rw-r--r--tests/storage/test_room.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/storage/test_room.py b/tests/storage/test_room.py
index 71ec74eadc..1e27f2c275 100644
--- a/tests/storage/test_room.py
+++ b/tests/storage/test_room.py
@@ -44,13 +44,13 @@ class RoomStoreTestCase(HomeserverTestCase):
     def test_get_room(self) -> None:
         res = self.get_success(self.store.get_room(self.room.to_string()))
         assert res is not None
-        self.assertDictContainsSubset(
+        self.assertLessEqual(
             {
                 "room_id": self.room.to_string(),
                 "creator": self.u_creator.to_string(),
                 "is_public": True,
-            },
-            res,
+            }.items(),
+            res.items(),
         )
 
     def test_get_room_unknown_room(self) -> None:
@@ -59,13 +59,13 @@ class RoomStoreTestCase(HomeserverTestCase):
     def test_get_room_with_stats(self) -> None:
         res = self.get_success(self.store.get_room_with_stats(self.room.to_string()))
         assert res is not None
-        self.assertDictContainsSubset(
+        self.assertLessEqual(
             {
                 "room_id": self.room.to_string(),
                 "creator": self.u_creator.to_string(),
                 "public": True,
-            },
-            res,
+            }.items(),
+            res.items(),
         )
 
     def test_get_room_with_stats_unknown_room(self) -> None: