From 1d187fcf656f8237d73c289af9f45d5e95ac3ad3 Mon Sep 17 00:00:00 2001 From: Serene-Arc Date: Thu, 24 Jun 2021 16:14:21 +1000 Subject: [PATCH] Consolidate tests --- tests/test_integration.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/tests/test_integration.py b/tests/test_integration.py index 0b4d36b..5465c5b 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -187,27 +187,14 @@ def test_cli_download_search_existing(test_args: list[str], tmp_path: Path): @pytest.mark.parametrize('test_args', ( ['--subreddit', 'tumblr', '-L', '25', '--skip', 'png', '--skip', 'jpg'], ['--subreddit', 'MaliciousCompliance', '-L', '25', '--skip', 'txt'], + ['--subreddit', 'tumblr', '-L', '10', '--skip-domain', 'i.redd.it'], )) def test_cli_download_download_filters(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 '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 + assert any((string in result.output for string in ('Download filter removed ', 'filtered due to URL'))) @pytest.mark.online