diff options
author | Erik Johnston <erik@matrix.org> | 2019-10-23 17:25:54 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-10-30 14:46:54 +0000 |
commit | 69f0054ce675bd9d35104c39af9fae9a908b7f33 (patch) | |
tree | 40dc037ff3bd919937cc5cb2deba317d3df40421 /tests/test_visibility.py | |
parent | Add StateGroupStorage interface (diff) | |
download | synapse-69f0054ce675bd9d35104c39af9fae9a908b7f33.tar.xz |
Port to use state storage
Diffstat (limited to 'tests/test_visibility.py')
-rw-r--r-- | tests/test_visibility.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/test_visibility.py b/tests/test_visibility.py index 6ae1ea9b04..f7381b2885 100644 --- a/tests/test_visibility.py +++ b/tests/test_visibility.py @@ -14,6 +14,8 @@ # limitations under the License. import logging +from mock import Mock + from twisted.internet import defer from twisted.internet.defer import succeed @@ -63,7 +65,7 @@ class FilterEventsForServerTestCase(tests.unittest.TestCase): events_to_filter.append(evt) filtered = yield filter_events_for_server( - self.store, "test_server", events_to_filter + self.storage, "test_server", events_to_filter ) # the result should be 5 redacted events, and 5 unredacted events. @@ -101,7 +103,7 @@ class FilterEventsForServerTestCase(tests.unittest.TestCase): # ... and the filtering happens. filtered = yield filter_events_for_server( - self.store, "test_server", events_to_filter + self.storage, "test_server", events_to_filter ) for i in range(0, len(events_to_filter)): @@ -258,6 +260,11 @@ class FilterEventsForServerTestCase(tests.unittest.TestCase): logger.info("Starting filtering") start = time.time() + + storage = Mock() + storage.main = test_store + storage.state = test_store + filtered = yield filter_events_for_server( test_store, "test_server", events_to_filter ) |