Skip to content

Commit

Permalink
Handle test nit by removing the temporary file
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatum committed Dec 11, 2024
1 parent e5369e0 commit 62ca1b3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1428,14 +1428,12 @@ def test_add_attachment_guesses_mimetype(record_setup: Client, tmp_path):
client = record_setup
mock_response(client.session)

p = tmp_path / "file.txt"
p.write_text("hello")
with patch("builtins.open", mock_open(read_data="hello")) as mock_file:
client.add_attachment(
id="abc",
bucket="a",
collection="b",
filepath=p,
filepath="file.txt",
)

client.session.request.assert_called_with(
Expand Down

0 comments on commit 62ca1b3

Please sign in to comment.