Add integration test for archiver option
This commit is contained in:
@@ -106,3 +106,18 @@ def test_cli_archive_long(test_args: list[str], tmp_path: Path):
|
||||
result = runner.invoke(cli, test_args)
|
||||
assert result.exit_code == 0
|
||||
assert re.search(r'Writing entry .*? to file in .*? format', 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', (
|
||||
['--ignore-user', 'ArjanEgges', '-l', 'm3hxzd'],
|
||||
))
|
||||
def test_cli_archive_ignore_user(test_args: list[str], tmp_path: Path):
|
||||
runner = CliRunner()
|
||||
test_args = create_basic_args_for_archive_runner(test_args, tmp_path)
|
||||
result = runner.invoke(cli, test_args)
|
||||
assert result.exit_code == 0
|
||||
assert 'being an ignored user' in result.output
|
||||
assert 'Attempting to archive submission' not in result.output
|
||||
|
||||
Reference in New Issue
Block a user