Skip to content

Commit

Permalink
ensure update_one is called with correct args
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
ritch and coderabbitai[bot] authored Sep 20, 2024
1 parent 08092d7 commit bf5b35b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/unittests/execution_store_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ def test_operator_execute_with_store(self):
result = self.operator.execute(self.ctx)

# Verify that the store interactions were made correctly
self.mock_collection.update_one.assert_called_once() # Checking that set operation inserts data
self.mock_collection.update_one.assert_called_once_with(
{"store_name": "test_store", "key": "my_key"},
{"$set": {"value": {"foo": "bar"}}}
)
self.mock_collection.find_one.assert_called_once_with(
{"store_name": "test_store", "key": "my_key"}
) # Checking that get operation retrieves data
Expand Down

0 comments on commit bf5b35b

Please sign in to comment.