summary refs log tree commit diff
path: root/tests/api
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-25 16:58:39 +0000
committerErik Johnston <erik@matrix.org>2016-01-25 16:58:39 +0000
commitc887c4cbd5366ecb59b739d298e520414ca12dee (patch)
treec0913b6f147b4adff5f0c8507f4325d61e321205 /tests/api
parentMerge pull request #525 from matrix-org/erikj/select_many (diff)
parentPEP8 (diff)
downloadsynapse-c887c4cbd5366ecb59b739d298e520414ca12dee.tar.xz
Merge pull request #524 from matrix-org/erikj/sync
Move some sync logic from rest to handlers pacakege
Diffstat (limited to 'tests/api')
-rw-r--r--tests/api/test_filtering.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/api/test_filtering.py b/tests/api/test_filtering.py
index 16ee6bbe6a..1a4e439d30 100644
--- a/tests/api/test_filtering.py
+++ b/tests/api/test_filtering.py
@@ -13,26 +13,24 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from collections import namedtuple
 from tests import unittest
 from twisted.internet import defer
 
-from mock import Mock, NonCallableMock
+from mock import Mock
 from tests.utils import (
     MockHttpResource, DeferredMockCallable, setup_test_homeserver
 )
 
 from synapse.types import UserID
-from synapse.api.filtering import FilterCollection, Filter
+from synapse.api.filtering import Filter
+from synapse.events import FrozenEvent
 
 user_localpart = "test_user"
 # MockEvent = namedtuple("MockEvent", "sender type room_id")
 
 
 def MockEvent(**kwargs):
-    ev = NonCallableMock(spec_set=kwargs.keys())
-    ev.configure_mock(**kwargs)
-    return ev
+    return FrozenEvent(kwargs)
 
 
 class FilteringTestCase(unittest.TestCase):