diff options
| author | Cody Logan <clpo13@gmail.com> | 2019-01-07 11:03:22 -0800 |
|---|---|---|
| committer | Cody Logan <clpo13@gmail.com> | 2019-01-07 11:03:22 -0800 |
| commit | c9191bae98fbad1b2aa5a7cedaaac414a519c17c (patch) | |
| tree | 3043964dd68e951e186a7d113713b2eaa9c0cce1 /test | |
| parent | 868b8fd6bddbe1608bc034588f5a6c69d24b2af6 (diff) | |
| download | wikiget-c9191bae98fbad1b2aa5a7cedaaac414a519c17c.tar.gz wikiget-c9191bae98fbad1b2aa5a7cedaaac414a519c17c.zip | |
Fix problem reading certain file names
URLs with encoded non-ASCII characters and files with spaces can now be downloaded as expected.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_wikiget.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test_wikiget.py b/test/test_wikiget.py index 981d640..4200bd4 100644 --- a/test/test_wikiget.py +++ b/test/test_wikiget.py @@ -32,14 +32,16 @@ def test_file_regex(): def test_invalid_file_input(): - invalid_input = ["file:example", "example"] + invalid_input = ["file:example", "example.jpg", "Foo Bar.gif", + "Fil:Example.jpg"] for i in invalid_input: file_match = wikiget.valid_file(i) assert file_match is None def test_valid_file_input(): - valid_input = ["example.jpg", "file:example.jpg", "example.file-01.jpg"] + valid_input = ["Image:example.jpg", "file:example.jpg", "File:example.file-01.jpg", + "File:ß handwritten sample.gif"] for i in valid_input: file_match = wikiget.valid_file(i) assert file_match is not None |
