mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 03:54:52 -04:00
Factor out some of the common homeserver setup code into a
setup_test_homeserver function in utils.
This commit is contained in:
parent
ba63b4be5d
commit
896253e085
25 changed files with 140 additions and 360 deletions
|
@ -17,24 +17,17 @@
|
|||
from tests import unittest
|
||||
from twisted.internet import defer
|
||||
|
||||
from synapse.server import HomeServer
|
||||
from synapse.storage.presence import PresenceStore
|
||||
from synapse.types import UserID
|
||||
|
||||
from tests.utils import SQLiteMemoryDbPool, MockClock
|
||||
from tests.utils import setup_test_homeserver, MockClock
|
||||
|
||||
|
||||
class PresenceStoreTestCase(unittest.TestCase):
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def setUp(self):
|
||||
db_pool = SQLiteMemoryDbPool()
|
||||
yield db_pool.prepare()
|
||||
|
||||
hs = HomeServer("test",
|
||||
clock=MockClock(),
|
||||
db_pool=db_pool,
|
||||
)
|
||||
hs = yield setup_test_homeserver(clock=MockClock())
|
||||
|
||||
self.store = PresenceStore(hs)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue