diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-07-27 12:32:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-27 12:32:08 -0400 |
commit | 5f65e6268146a5ae7b8dafdfe2290b791e8b4c92 (patch) | |
tree | 79b4efd8d94bd19231a39bda075624251bfa3568 /tests/test_visibility.py | |
parent | Convert push to async/await. (#7948) (diff) | |
download | synapse-5f65e6268146a5ae7b8dafdfe2290b791e8b4c92.tar.xz |
Convert groups and visibility code to async / await. (#7951)
Diffstat (limited to '')
-rw-r--r-- | tests/test_visibility.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_visibility.py b/tests/test_visibility.py index b371efc0df..a7a36174ea 100644 --- a/tests/test_visibility.py +++ b/tests/test_visibility.py @@ -64,8 +64,8 @@ class FilterEventsForServerTestCase(tests.unittest.TestCase): evt = yield self.inject_room_member(user, extra_content={"a": "b"}) events_to_filter.append(evt) - filtered = yield filter_events_for_server( - self.storage, "test_server", events_to_filter + filtered = yield defer.ensureDeferred( + filter_events_for_server(self.storage, "test_server", events_to_filter) ) # the result should be 5 redacted events, and 5 unredacted events. @@ -102,8 +102,8 @@ class FilterEventsForServerTestCase(tests.unittest.TestCase): yield self.hs.get_datastore().mark_user_erased("@erased:local_hs") # ... and the filtering happens. - filtered = yield filter_events_for_server( - self.storage, "test_server", events_to_filter + filtered = yield defer.ensureDeferred( + filter_events_for_server(self.storage, "test_server", events_to_filter) ) for i in range(0, len(events_to_filter)): @@ -265,8 +265,8 @@ class FilterEventsForServerTestCase(tests.unittest.TestCase): storage.main = test_store storage.state = test_store - filtered = yield filter_events_for_server( - test_store, "test_server", events_to_filter + filtered = yield defer.ensureDeferred( + filter_events_for_server(test_store, "test_server", events_to_filter) ) logger.info("Filtering took %f seconds", time.time() - start) |