summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2015-01-27 16:17:56 +0000
committerPaul "LeoNerd" Evans <paul@matrix.org>2015-01-27 16:17:56 +0000
commit059651efa19a88eb0823bce1d5beff2d95cb01c2 (patch)
tree51f89ec0377a8c4ec3016938b15ba82cfb76b9c4 /tests
parentInitial trivial unittest of Filtering object (diff)
downloadsynapse-059651efa19a88eb0823bce1d5beff2d95cb01c2.tar.xz
Have the Filtering API return Deferreds, so we can do the Datastore implementation nicely
Diffstat (limited to 'tests')
-rw-r--r--tests/api/test_filtering.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/api/test_filtering.py b/tests/api/test_filtering.py
index c6c5317696..fecadd1056 100644
--- a/tests/api/test_filtering.py
+++ b/tests/api/test_filtering.py
@@ -53,14 +53,15 @@ class FilteringTestCase(unittest.TestCase):
 
         self.filtering = hs.get_filtering()
 
+    @defer.inlineCallbacks
     def test_filter(self):
-        filter_id = self.filtering.add_user_filter(
+        filter_id = yield self.filtering.add_user_filter(
             user_localpart=user_localpart,
             definition={"type": ["m.*"]},
         )
         self.assertEquals(filter_id, 0)
 
-        filter = self.filtering.get_user_filter(
+        filter = yield self.filtering.get_user_filter(
             user_localpart=user_localpart,
             filter_id=filter_id,
         )