summary refs log tree commit diff
path: root/tests/rest/client
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-26 13:52:29 +0000
committerErik Johnston <erik@matrix.org>2016-01-26 13:52:29 +0000
commit9959d9ece84d85dae3ed06b22e3f234575b93fd1 (patch)
treee5d4fd2289abdac72f2a7bf9f0a0dda2e0bb72f5 /tests/rest/client
parentMerge pull request #524 from matrix-org/erikj/sync (diff)
downloadsynapse-9959d9ece84d85dae3ed06b22e3f234575b93fd1.tar.xz
Remove redundated BaseHomeServer
Diffstat (limited to 'tests/rest/client')
-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)