diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-08-27 17:24:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-27 17:24:46 -0400 |
commit | e00816ad98a1165b67238f9711cb1b0e7135f25f (patch) | |
tree | 3b0135e8c57b2b9082191088237298f7b50615f7 /tests/storage/test_main.py | |
parent | Convert stats and related calls to async/await (#8192) (diff) | |
download | synapse-e00816ad98a1165b67238f9711cb1b0e7135f25f.tar.xz |
Do not yield on awaitables in tests. (#8193)
Diffstat (limited to 'tests/storage/test_main.py')
-rw-r--r-- | tests/storage/test_main.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/storage/test_main.py b/tests/storage/test_main.py index 954338a592..7e7f1286d9 100644 --- a/tests/storage/test_main.py +++ b/tests/storage/test_main.py @@ -34,14 +34,16 @@ class DataStoreTestCase(unittest.TestCase): @defer.inlineCallbacks def test_get_users_paginate(self): - yield self.store.register_user(self.user.to_string(), "pass") + yield defer.ensureDeferred( + self.store.register_user(self.user.to_string(), "pass") + ) yield defer.ensureDeferred(self.store.create_profile(self.user.localpart)) yield defer.ensureDeferred( self.store.set_profile_displayname(self.user.localpart, self.displayname) ) - users, total = yield self.store.get_users_paginate( - 0, 10, name="bc", guests=False + users, total = yield defer.ensureDeferred( + self.store.get_users_paginate(0, 10, name="bc", guests=False) ) self.assertEquals(1, total) |