diff --git a/tests/test_cli.py b/tests/test_cli.py index a275fcc..57254e6 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -91,7 +91,7 @@ def config_calls(monkeypatch: pytest.MonkeyPatch) -> list[tuple[str, Optional[st calls: list[tuple[str, Optional[str]]] = [] read_config = sb._read_config - def record(config_file: str, user: Optional[str] = None) -> dict[str, Any]: + def record(config_file: str, user: Optional[str] = None) -> sb.ConfigArgs: calls.append((config_file, user)) return read_config('/nonexistent/simple_backup.conf', user) diff --git a/tests/test_config.py b/tests/test_config.py index f48d6c7..1cd4491 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -85,6 +85,7 @@ keep=3 config_args = sb._read_config(config_file, USER) + assert config_args['inputs'] is not None assert sorted(config_args['inputs']) == [f'{tmp_path}/one', f'{tmp_path}/two'] # Expanded later, as it may be a path on the server assert config_args['output'] == '~/backups' @@ -176,9 +177,9 @@ numeric_ids= config_args = sb._read_config(config_file, USER) - for key in ['ssh_host', 'ssh_user', 'ssh_keyfile']: - assert config_args[key] is None - + assert config_args['ssh_host'] is None + assert config_args['ssh_user'] is None + assert config_args['ssh_keyfile'] is None assert config_args['remote_sudo'] is False assert config_args['numeric_ids'] is False