Skip to content

Commit dfcfd4b

Browse files
Pigbibicursoragent
andauthored
Mock market-hours gate in HTTP tests except market-closed case. (#152)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent ee7fae6 commit dfcfd4b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/test_request_handling.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
import main
88

99

10+
@pytest.fixture(autouse=True)
11+
def _assume_market_open_for_http_tests(monkeypatch, request):
12+
if request.node.name == "test_run_endpoint_skips_when_market_closed":
13+
return
14+
monkeypatch.setattr(main, "_should_skip_for_market_hours", lambda: (False, None))
15+
16+
1017
def route_methods():
1118
methods_by_route = {}
1219
for rule in main.app.url_map.iter_rules():

0 commit comments

Comments
 (0)