Skip to content

Commit

Permalink
Fix different call counts for both pyscopg and motor unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Wout Feys committed Nov 18, 2024
1 parent 9133c1c commit 8a81865
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aikido_zen/sinks/tests/motor_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ async def test_find_one_and_replace(db):
filter=_filter, replacement={"dog_name": "test2"}
)

called_with = mock_run_vulnerability_scan.call_args[1]
called_with = mock_run_vulnerability_scan.call_args_list[0][1]
assert called_with["args"][0] == _filter
assert called_with["op"] == "pymongo.collection.Collection.find_one_and_replace"
assert called_with["kind"] == "nosql_injection"
Expand Down
2 changes: 1 addition & 1 deletion aikido_zen/sinks/tests/psycopg_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_cursor_execute(database_conn):
query = "SELECT * FROM dogs"
cursor.execute(query)

called_with = mock_run_vulnerability_scan.call_args[1]
called_with = mock_run_vulnerability_scan.call_args_list[0][1]
assert called_with["args"][0] == query
assert isinstance(called_with["args"][1], Postgres)
assert called_with["op"] == "psycopg.Cursor.execute"
Expand Down

0 comments on commit 8a81865

Please sign in to comment.