test_superfaktura_api: fix unnecessary mock file open

This commit is contained in:
Richard Kubíček
2025-03-11 21:23:56 +01:00
parent 8d3b2589b0
commit b41bf28a34

View File

@@ -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)