Skip to content

Commit f743def

Browse files
committed
Fix unit test
1 parent 738478a commit f743def

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/unit/test_driver.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ def test_driver_trust_config_error(
124124
def test_driver_opens_write_session_by_default(uri, mocker):
125125
driver = GraphDatabase.driver(uri)
126126
from neo4j.work.transaction import Transaction
127-
with driver.session() as session:
127+
# we set a specific db, because else the driver would try to fetch a RT
128+
# to get hold of the actual home database (which won't work in this
129+
# unittest)
130+
with driver.session(database="foobar") as session:
128131
acquire_mock = mocker.patch.object(session._pool, "acquire",
129132
autospec=True)
130133
tx_begin_mock = mocker.patch.object(Transaction, "_begin",

0 commit comments

Comments
 (0)