-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add transactions queries * update mg version * flake8 + black * Add test + review comments * Delete unnecessary variable init
- Loading branch information
1 parent
43c302f
commit cb21b4a
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
def test_get_transactions(memgraph): | ||
result = memgraph.get_transactions() | ||
assert len(result) == 1 | ||
assert result[0].username == ("",) | ||
assert result[0].transaction_id != "" | ||
assert result[0].query == ["SHOW TRANSACTIONS;"] | ||
assert result[0].metadata == {} | ||
|
||
|
||
def test_terminate_transactions(memgraph): | ||
result = memgraph.get_transactions() | ||
terminated_transactions = memgraph.terminate_transactions([result[0].transaction_id]) | ||
assert terminated_transactions[0].killed is False | ||
assert terminated_transactions[0].transaction_id == result[0].transaction_id |