From 971c5b067e08966c48dd39ffc4eb410b3fc9f95b Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Wed, 11 Nov 2026 13:00:29 +0100 Subject: [PATCH] Test total-block-refresh dispatch Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WzxdWWzuCEg1m87jpKyRrw --- .../tests/test_main_dispatch_extra_gaming.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/steam_backlog_enforcer/tests/test_main_dispatch_extra_gaming.py b/steam_backlog_enforcer/tests/test_main_dispatch_extra_gaming.py index 7091087..54926c2 100644 --- a/steam_backlog_enforcer/tests/test_main_dispatch_extra_gaming.py +++ b/steam_backlog_enforcer/tests/test_main_dispatch_extra_gaming.py @@ -1,4 +1,4 @@ -"""Tests for the main CLI: enforce and gaming-unblock dispatch.""" +"""Tests for the main CLI: enforce, gaming-unblock, total-block-refresh dispatch.""" from unittest.mock import patch @@ -56,3 +56,15 @@ class TestMainDispatchGamingCommands: ): main() mock_cmd.assert_called_once_with([]) + + def test_total_block_refresh_dispatches_with_its_tail_args(self) -> None: + """total-block-refresh hands its argv tail to the handler and exits.""" + argv = ["prog", "total-block-refresh", "--dry-run"] + with ( + cli_run(argv, total_block=False), + patch(f"{PKG}.cmd_total_block_refresh", return_value=3) as mock_cmd, + pytest.raises(SystemExit) as exc_info, + ): + main() + assert exc_info.value.code == 3 + mock_cmd.assert_called_once_with(["--dry-run"])