From fc778e2bce34825b068e2a90eac09c05d8cce747 Mon Sep 17 00:00:00 2001
From: "Paul \"LeoNerd\" Evans" <paul@matrix.org>
Date: Wed, 13 Aug 2014 18:26:42 +0100
Subject: [PATCH] =?UTF-8?q?Move=20MockClock=20into=20tests.utils=20so=20we?=
 =?UTF-8?q?=20can=20re=C3=BCse=20it?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 tests/federation/test_federation.py | 12 +-----------
 tests/utils.py                      | 10 ++++++++++
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/tests/federation/test_federation.py b/tests/federation/test_federation.py
index a3bcb5ede8..ec39c7ee33 100644
--- a/tests/federation/test_federation.py
+++ b/tests/federation/test_federation.py
@@ -20,7 +20,7 @@ from twisted.trial import unittest
 from mock import Mock
 import logging
 
-from ..utils import MockHttpServer
+from ..utils import MockHttpServer, MockClock
 
 from synapse.server import HomeServer
 from synapse.federation import initialize_http_replication
@@ -48,16 +48,6 @@ def make_pdu(prev_pdus=[], **kwargs):
     return PduTuple(PduEntry(**pdu_fields), prev_pdus)
 
 
-class MockClock(object):
-    now = 1000
-
-    def time(self):
-        return self.now
-
-    def time_msec(self):
-        return self.time() * 1000
-
-
 class FederationTestCase(unittest.TestCase):
     def setUp(self):
         self.mock_http_server = MockHttpServer()
diff --git a/tests/utils.py b/tests/utils.py
index 578866b4f4..e397712d82 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -95,6 +95,16 @@ class MockHttpServer(HttpServer):
         self.callbacks.append((method, path_pattern, callback))
 
 
+class MockClock(object):
+    now = 1000
+
+    def time(self):
+        return self.now
+
+    def time_msec(self):
+        return self.time() * 1000
+
+
 class MemoryDataStore(object):
 
     class RoomMember(namedtuple(
-- 
GitLab