diff options
| author | Cody Logan <cody@lokken.dev> | 2023-11-15 10:36:18 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-15 10:36:18 -0800 |
| commit | bf3a7db6cf83fa7d224d84c47b40cfe32603019c (patch) | |
| tree | ffeb394c3da9e4a2dcbc6a92caa956d5c83441eb /tests/test_dl.py | |
| parent | 55a5311ee4da639a65bd60622315f3fff6936c9a (diff) | |
| download | wikiget-bf3a7db6cf83fa7d224d84c47b40cfe32603019c.tar.gz wikiget-bf3a7db6cf83fa7d224d84c47b40cfe32603019c.zip | |
Convert File.dest from a string to a Path (#14)
Diffstat (limited to 'tests/test_dl.py')
| -rw-r--r-- | tests/test_dl.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_dl.py b/tests/test_dl.py index cb5f0b6..cb893b8 100644 --- a/tests/test_dl.py +++ b/tests/test_dl.py @@ -375,7 +375,7 @@ class TestDownload: with patch("wikiget.dl.verify_hash") as mock_verify_hash: mock_verify_hash.return_value = "d01b79a6781c72ac9bfff93e5e2cfbeef4efc840" - args = parse_args(["-o", tmp_file, "File:Example.jpg"]) + args = parse_args(["-o", str(tmp_file), "File:Example.jpg"]) errors = download(mock_file, args) assert caplog.record_tuples[0] == ( @@ -414,7 +414,7 @@ class TestDownload: If the downloaded file cannot be created, an error log message should be created with details on the exception. """ - with patch("wikiget.dl.Path.open") as mock_open: + with patch("pathlib.Path.open") as mock_open: mock_open.side_effect = OSError("write error") args = parse_args(["File:Example.jpg"]) errors = download(mock_file, args) |
