Clarify missing Eurostar price states
This commit is contained in:
parent
ed8a5626a4
commit
2b475aa726
4 changed files with 122 additions and 6 deletions
|
|
@ -183,9 +183,30 @@ def test_results_can_render_from_weekday_timetable_cache(monkeypatch: Any) -> No
|
|||
assert "/api/results_refresh/BRI/paris/2026-06-22" in html
|
||||
assert "refreshFullResults()" in html
|
||||
assert "window.location.reload()" not in html
|
||||
assert "Checking Eurostar price" in html
|
||||
assert "Eurostar prices not yet available" not in html
|
||||
|
||||
|
||||
def test_eurostar_price_status_distinguishes_sold_out() -> None:
|
||||
prices = app_module._eurostar_prices_by_row(
|
||||
"outbound",
|
||||
"outbound",
|
||||
[
|
||||
{
|
||||
"depart_st_pancras": "10:01",
|
||||
"price": None,
|
||||
"seats": 0,
|
||||
"plus_price": None,
|
||||
"plus_seats": None,
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
assert prices["outbound:10:01"]["es_standard"] is None
|
||||
assert prices["outbound:10:01"]["es_standard_status"] == "sold_out"
|
||||
assert prices["outbound:10:01"]["es_plus_status"] == "price_not_returned"
|
||||
|
||||
|
||||
def test_results_refresh_reloads_when_exact_timetable_differs(monkeypatch: Any) -> None:
|
||||
travel_date = "2026-06-22"
|
||||
cache: dict[str, Any] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue