Skip to content

Commit

Permalink
Don't use autospec in a test where it fails
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Bompard <[email protected]>
  • Loading branch information
abompard committed Jun 12, 2024
1 parent f176d0a commit 689bf97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def test_raw_exceptions_possible_sizes_not_in_list(self, grep):
target = b"size must be in one of these:"
assert target in resp.data, f"{target!r} not in {resp.data!r}"

@patch("datagrepper.app.dm.Message.query", autospec=True)
@patch("datagrepper.app.dm.Message.query")
def test_id(self, query):
msg = query.filter_by.return_value.first.return_value
msg.as_dict = MagicMock(return_value={"key": "value"})
Expand Down

0 comments on commit 689bf97

Please sign in to comment.