mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:04:50 -04:00
Fix tests
This commit is contained in:
parent
a955cbfa49
commit
0487c9441f
3 changed files with 12 additions and 5 deletions
|
@ -60,8 +60,10 @@ def setup_test_homeserver(name="test", datastore=None, config=None, **kargs):
|
|||
name, db_pool=db_pool, config=config,
|
||||
version_string="Synapse/tests",
|
||||
database_engine=create_engine("sqlite3"),
|
||||
get_db_conn=db_pool.get_db_conn,
|
||||
**kargs
|
||||
)
|
||||
hs.setup()
|
||||
else:
|
||||
hs = HomeServer(
|
||||
name, db_pool=None, datastore=datastore, config=config,
|
||||
|
@ -280,6 +282,12 @@ class SQLiteMemoryDbPool(ConnectionPool, object):
|
|||
lambda conn: prepare_database(conn, engine)
|
||||
)
|
||||
|
||||
def get_db_conn(self):
|
||||
conn = self.connect()
|
||||
engine = create_engine("sqlite3")
|
||||
prepare_database(conn, engine)
|
||||
return conn
|
||||
|
||||
|
||||
class MemoryDataStore(object):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue