diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-08-26 07:19:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-26 07:19:32 -0400 |
commit | 4c6c56dc58aba7af92f531655c2355d8f25e529c (patch) | |
tree | f08e4193836fc542f1400fbe407c6323f54171c2 /tests/storage/test_room.py | |
parent | Fix rate limiting unit tests. (#8167) (diff) | |
download | synapse-4c6c56dc58aba7af92f531655c2355d8f25e529c.tar.xz |
Convert simple_select_one and simple_select_one_onecol to async (#8162)
Diffstat (limited to 'tests/storage/test_room.py')
-rw-r--r-- | tests/storage/test_room.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/storage/test_room.py b/tests/storage/test_room.py index d07b985a8e..bc8400f240 100644 --- a/tests/storage/test_room.py +++ b/tests/storage/test_room.py @@ -54,12 +54,14 @@ class RoomStoreTestCase(unittest.TestCase): "creator": self.u_creator.to_string(), "is_public": True, }, - (yield self.store.get_room(self.room.to_string())), + (yield defer.ensureDeferred(self.store.get_room(self.room.to_string()))), ) @defer.inlineCallbacks def test_get_room_unknown_room(self): - self.assertIsNone((yield self.store.get_room("!uknown:test")),) + self.assertIsNone( + (yield defer.ensureDeferred(self.store.get_room("!uknown:test"))) + ) @defer.inlineCallbacks def test_get_room_with_stats(self): @@ -69,12 +71,22 @@ class RoomStoreTestCase(unittest.TestCase): "creator": self.u_creator.to_string(), "public": True, }, - (yield self.store.get_room_with_stats(self.room.to_string())), + ( + yield defer.ensureDeferred( + self.store.get_room_with_stats(self.room.to_string()) + ) + ), ) @defer.inlineCallbacks def test_get_room_with_stats_unknown_room(self): - self.assertIsNone((yield self.store.get_room_with_stats("!uknown:test")),) + self.assertIsNone( + ( + yield defer.ensureDeferred( + self.store.get_room_with_stats("!uknown:test") + ) + ), + ) class RoomEventsStoreTestCase(unittest.TestCase): |