Factor out some of the common homeserver setup code into a

setup_test_homeserver function in utils.
This commit is contained in:
Mark Haines 2015-02-11 11:37:30 +00:00
parent ba63b4be5d
commit 896253e085
25 changed files with 140 additions and 360 deletions

View file

@ -17,23 +17,17 @@
from tests import unittest
from twisted.internet import defer
from synapse.server import HomeServer
from synapse.storage.profile import ProfileStore
from synapse.types import UserID
from tests.utils import SQLiteMemoryDbPool
from tests.utils import setup_test_homeserver
class ProfileStoreTestCase(unittest.TestCase):
@defer.inlineCallbacks
def setUp(self):
db_pool = SQLiteMemoryDbPool()
yield db_pool.prepare()
hs = HomeServer("test",
db_pool=db_pool,
)
hs = yield setup_test_homeserver()
self.store = ProfileStore(hs)