From b41bf28a34f71df024af0a36060c260ebd5288ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20Kub=C3=AD=C4=8Dek?= Date: Tue, 11 Mar 2025 21:23:56 +0100 Subject: [PATCH] test_superfaktura_api: fix unnecessary mock file open --- test/test_superfaktura_api.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/test_superfaktura_api.py b/test/test_superfaktura_api.py index 919140a..c4e295e 100644 --- a/test/test_superfaktura_api.py +++ b/test/test_superfaktura_api.py @@ -84,6 +84,5 @@ def test_download_not_writable_descriptor(api): mock_get.return_value.content = b"test_content" mock_descriptor = MagicMock() mock_descriptor.writable.return_value = False - with patch("builtins.open", mock_open()) as mock_file: - with pytest.raises(SuperFakturaAPIException, match=" is not writable"): - api.download("test_endpoint", mock_descriptor) + with pytest.raises(SuperFakturaAPIException, match=" is not writable"): + api.download("test_endpoint", mock_descriptor)