Skip to content

Commit

Permalink
tests: fix incorrect usage of MagicMock
Browse files Browse the repository at this point in the history
`MagicMock.called_with` never did anything
method is actually named  `assert_called_with`
  • Loading branch information
martinobersteiner authored and kpsherva committed Sep 13, 2024
1 parent 724796e commit 7cdd9d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_views_multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def _mock_celery_result():
if res.status_code == 200:
data = get_json(res)
assert data["completed"] is True
assert task.called_with(str(multipart.upload_id))
assert task.delay.call_args.args == (str(multipart.upload_id),)
# Two whitespaces expected to have been sent to client before
# JSON was sent.
assert res.data.startswith(b" {")
Expand Down

0 comments on commit 7cdd9d2

Please # to comment.