Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl committed Aug 1, 2018
1 parent 8622f58 commit f2d610d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def setupdb():
db_conn.close()

# Set up in the db
db_conn = db_engine.module.connect("dbname=synapse_base user=%s" % (POSTGRES_USER,))
db_conn = db_engine.module.connect(
"dbname=synapse_base user=%s" % (POSTGRES_USER,))
cur = db_conn.cursor()
_get_or_create_schema_state(cur, db_engine)
_setup_new_database(cur, db_engine)
Expand Down Expand Up @@ -152,7 +153,8 @@ def setup_test_homeserver(name="test", datastore=None, config=None, reactor=None
# Create the database before we actually try and connect to it, based off
# the template database we generate in setupdb()
if datastore is None and isinstance(db_engine, PostgresEngine):
db_conn = db_engine.module.connect("dbname=synapse_base user=%s" % (POSTGRES_USER,))
db_conn = db_engine.module.connect(
"dbname=synapse_base user=%s" % (POSTGRES_USER,))
db_conn.autocommit = True
cur = db_conn.cursor()
cur.execute("DROP DATABASE IF EXISTS synapse_test;")
Expand Down

0 comments on commit f2d610d

Please sign in to comment.