Skip to content

Commit fde83e4

Browse files
committed
fix: test_transaction_list
running test on separate db
1 parent 85cef6d commit fde83e4

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/test_transaction.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
TransactionInitError,
99
TransactionStatusError,
1010
)
11-
from tests.helpers import extract
11+
from tests.helpers import extract, generate_db_name
1212

1313

1414
def test_transaction_execute_raw(db, col, docs):
@@ -151,7 +151,16 @@ def test_transaction_graph(db, graph, fvcol, fvdocs):
151151
txn_db.commit_transaction()
152152

153153

154-
def test_transaction_list(db):
154+
def test_transaction_list(client, sys_db, username, password):
155+
db_name = generate_db_name()
156+
157+
sys_db.create_database(
158+
name=db_name,
159+
users=[{"username": username, "password": password, "active": True}],
160+
)
161+
162+
db = client.db(db_name, username, password)
163+
155164
assert db.list_transactions() == []
156165

157166
txn_db = db.begin_transaction()
@@ -169,3 +178,5 @@ def test_transaction_list(db):
169178
txn_db_2.commit_transaction()
170179

171180
assert db.list_transactions() == []
181+
182+
sys_db.delete_database(db_name)

0 commit comments

Comments
 (0)