diff options
| author | Cody Logan <cody@lokken.dev> | 2023-11-16 11:09:14 -0800 |
|---|---|---|
| committer | Cody Logan <cody@lokken.dev> | 2023-11-16 11:13:44 -0800 |
| commit | 291d4ab44eaf5fcd2a4033f705170eb27dfe74e8 (patch) | |
| tree | 7defb5d80f8e05e68651789cbc9b889e0c55902c /tests/test_dl.py | |
| parent | ce58a03caa6f4d9e3cb01898b4b73716031b24dd (diff) | |
| download | wikiget-291d4ab44eaf5fcd2a4033f705170eb27dfe74e8.tar.gz wikiget-291d4ab44eaf5fcd2a4033f705170eb27dfe74e8.zip | |
Fix bug when downloading non-local files from a wiki
Revert to the pre-v0.6.0 method of checking for file existence.
A change introduced in v0.6.0 caused the check to fail if the file
existed only in a shared repository and not locally on the requested
wiki.
Diffstat (limited to 'tests/test_dl.py')
| -rw-r--r-- | tests/test_dl.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/test_dl.py b/tests/test_dl.py index cb893b8..e062116 100644 --- a/tests/test_dl.py +++ b/tests/test_dl.py @@ -307,7 +307,6 @@ class TestDownload: """ file = File(name="Example.jpg") file.image = Mock() - file.image.exists = True file.image.imageinfo = { "url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg", "size": 9022, @@ -475,7 +474,7 @@ class TestDownload: self, mock_file: File, caplog: pytest.LogCaptureFixture ) -> None: """Test that a warning message is logged if no file info was returned.""" - mock_file.image.exists = False + mock_file.image.imageinfo = {} args = parse_args(["File:Example.jpg"]) errors = download(mock_file, args) |
