summary refs log tree commit diff
path: root/tests/storage/test_appservice.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-01 14:12:33 +0100
committerErik Johnston <erik@matrix.org>2015-04-01 14:12:33 +0100
commit9236136f3a4f0d8119d4a6333f37378f8e259e4a (patch)
treec8e806fc815f9215501e409cf20471529cef4d15 /tests/storage/test_appservice.py
parentFix unicode database support (diff)
downloadsynapse-9236136f3a4f0d8119d4a6333f37378f8e259e4a.tar.xz
Make work in both Maria and SQLite. Fix tests
Diffstat (limited to 'tests/storage/test_appservice.py')
-rw-r--r--tests/storage/test_appservice.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/storage/test_appservice.py b/tests/storage/test_appservice.py
index ca5b92ec85..2ad55c8462 100644
--- a/tests/storage/test_appservice.py
+++ b/tests/storage/test_appservice.py
@@ -16,22 +16,18 @@ from tests import unittest
 from twisted.internet import defer
 
 from synapse.appservice import ApplicationService
-from synapse.server import HomeServer
 from synapse.storage.appservice import ApplicationServiceStore
 
-from mock import Mock
-from tests.utils import SQLiteMemoryDbPool, MockClock
+from tests.utils import setup_test_homeserver
 
 
 class ApplicationServiceStoreTestCase(unittest.TestCase):
 
     @defer.inlineCallbacks
     def setUp(self):
-        db_pool = SQLiteMemoryDbPool()
-        yield db_pool.prepare()
-        hs = HomeServer(
-            "test", db_pool=db_pool, clock=MockClock(), config=Mock()
-        )
+        hs = yield setup_test_homeserver()
+        db_pool = hs.get_db_pool()
+
         self.as_token = "token1"
         db_pool.runQuery(
             "INSERT INTO application_services(token) VALUES(?)",