Check submission URL against filter before factory

This commit is contained in:
Serene-Arc
2021-06-23 14:30:39 +10:00
parent 71930e06a8
commit e5be624f1e
2 changed files with 18 additions and 1 deletions

View File

@@ -189,6 +189,20 @@ def test_cli_download_download_filters(test_args: list[str], tmp_path: Path):
assert 'Download filter removed ' in result.output
@pytest.mark.online
@pytest.mark.reddit
@pytest.mark.skipif(not does_test_config_exist, reason='A test config file is required for integration tests')
@pytest.mark.parametrize('test_args', (
['--subreddit', 'tumblr', '-L', '10', '--skip-domain', 'i.redd.it'],
))
def test_cli_download_download_filter_domain(test_args: list[str], tmp_path: Path):
runner = CliRunner()
test_args = create_basic_args_for_download_runner(test_args, tmp_path)
result = runner.invoke(cli, test_args)
assert result.exit_code == 0
assert 'filtered due to URL' in result.output
@pytest.mark.online
@pytest.mark.reddit
@pytest.mark.slow