summary refs log tree commit diff
path: root/tests/rest
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-27 17:36:31 +0000
committerErik Johnston <erik@matrix.org>2016-01-27 17:36:31 +0000
commit561088000306db787c1b924fa33e704665a795be (patch)
tree36d3f03438ceea8ddf22c461af408b8e7140c3d1 /tests/rest
parentMerge pull request #533 from matrix-org/rav/hashtest_federation (diff)
parentDon't turn on profiling (diff)
downloadsynapse-561088000306db787c1b924fa33e704665a795be.tar.xz
Merge pull request #530 from matrix-org/erikj/server_refactor
Remove redundant BaseHomeServer
Diffstat (limited to 'tests/rest')
-rw-r--r--tests/rest/client/v1/test_presence.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/rest/client/v1/test_presence.py b/tests/rest/client/v1/test_presence.py
index 90b911f879..8d7cfd79ab 100644
--- a/tests/rest/client/v1/test_presence.py
+++ b/tests/rest/client/v1/test_presence.py
@@ -280,6 +280,15 @@ class PresenceEventStreamTestCase(unittest.TestCase):
         }
         EventSources.SOURCE_TYPES["presence"] = PresenceEventSource
 
+        clock = Mock(spec=[
+            "call_later",
+            "cancel_call_later",
+            "time_msec",
+            "looping_call",
+        ])
+
+        clock.time_msec.return_value = 1000000
+
         hs = yield setup_test_homeserver(
             http_client=None,
             resource_for_client=self.mock_resource,
@@ -289,16 +298,9 @@ class PresenceEventStreamTestCase(unittest.TestCase):
                 "get_presence_list",
                 "get_rooms_for_user",
             ]),
-            clock=Mock(spec=[
-                "call_later",
-                "cancel_call_later",
-                "time_msec",
-                "looping_call",
-            ]),
+            clock=clock,
         )
 
-        hs.get_clock().time_msec.return_value = 1000000
-
         def _get_user_by_req(req=None, allow_guest=False):
             return Requester(UserID.from_string(myid), "", False)