test: use constant in log assertion instead of hardcoded 75

Simplify-code finding: test hardcoded exit code 75 in string
assertion while already importing GATEWAY_SERVICE_RESTART_EXIT_CODE.
Use f-string interpolation so the assertion tracks the constant.
This commit is contained in:
kshitij 2026-08-13 14:01:27 +05:30
parent 64aaf56dbc
commit 04d8222115
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ def test_cron_provider_stop_cannot_override_gateway_exit_code(caplog):
gateway_run._stop_cron_provider(provider)
provider.stop.assert_called_once_with()
assert "attempted to exit the gateway with code 75; ignoring" in caplog.text
assert f"attempted to exit the gateway with code {GATEWAY_SERVICE_RESTART_EXIT_CODE}; ignoring" in caplog.text
@pytest.mark.asyncio