Fix download filename tests
If we want the same restrictive escaping in existing downloads, we'll need to simulate Windows.
This commit is contained in:
parent
1abfc03965
commit
8d69d9d412
@ -62,6 +62,7 @@ def test_download_model(qapp, qtmodeltester, config_stub, cookiejar_and_cache,
|
||||
'',
|
||||
None),
|
||||
])
|
||||
@pytest.mark.fake_os('windows')
|
||||
def test_page_titles(url, title, out):
|
||||
assert downloads.suggested_fn_from_title(url, title) == out
|
||||
|
||||
|
@ -649,6 +649,7 @@ def test_sanitize_filename(inp, expected, monkeypatch):
|
||||
assert utils.sanitize_filename(inp) == expected
|
||||
|
||||
|
||||
@pytest.mark.fake_os('windows')
|
||||
def test_sanitize_filename_empty_replacement():
|
||||
name = '/<Bad File>/'
|
||||
assert utils.sanitize_filename(name, replacement=None) == 'Bad File'
|
||||
|
Loading…
Reference in New Issue
Block a user