Spaces:
Running
Running
File size: 642 Bytes
9da4e9c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 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"
|