Spaces:
Running
Running
| from __future__ import annotations | |
| from pathlib import Path | |
| from racing_reports.runner import request_from_yaml | |
| def test_request_from_yaml(tmp_path: Path): | |
| cfg = tmp_path / "request.yml" | |
| cfg.write_text( | |
| """ | |
| league: Spanish Segunda Division | |
| season: 25-26 | |
| match_id: m1 | |
| home_team: Racing de Santander | |
| away_team: Almería | |
| report_types: [pre_match, block_zscore] | |
| settings: | |
| block_zscore: | |
| date_from: 2026-03-17 | |
| """, | |
| encoding="utf-8", | |
| ) | |
| request = request_from_yaml(cfg) | |
| assert request.report_types == ["pre_match", "block_zscore"] | |
| assert request.settings["block_zscore"]["date_from"] == "2026-03-17" | |