From cc4ee06688c79250d22b8d276b17d17a528288cc Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Sun, 28 Jun 2026 05:32:08 +0800 Subject: [PATCH] Mock market-hours gate in HTTP tests except market-closed case. Co-authored-by: Cursor --- tests/test_request_handling.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_request_handling.py b/tests/test_request_handling.py index 72fc5da..dc6a72f 100644 --- a/tests/test_request_handling.py +++ b/tests/test_request_handling.py @@ -7,6 +7,13 @@ import main +@pytest.fixture(autouse=True) +def _assume_market_open_for_http_tests(monkeypatch, request): + if request.node.name == "test_run_endpoint_skips_when_market_closed": + return + monkeypatch.setattr(main, "_should_skip_for_market_hours", lambda: (False, None)) + + def route_methods(): methods_by_route = {} for rule in main.app.url_map.iter_rules():