Extract trip timezones and conference preparation into agenda modules

This commit is contained in:
Edward Betts 2026-09-09 12:03:51 +01:00
parent df7fd2fb9e
commit e3eb3e5af8
5 changed files with 591 additions and 548 deletions

View file

@ -6,14 +6,13 @@ from types import SimpleNamespace
import yaml
import agenda.conference_list
import agenda.fx
import agenda.trip
import web_view
def test_build_conference_list_supports_inexact_dates(
tmp_path: typing.Any, monkeypatch: typing.Any
) -> None:
def test_build_conference_list_supports_inexact_dates(tmp_path: typing.Any) -> None:
"""Conference list should include tentative and approximate dates."""
conferences = [
{
@ -57,10 +56,7 @@ def test_build_conference_list_supports_inexact_dates(
encoding="utf-8",
)
monkeypatch.setitem(web_view.app.config, "PERSONAL_DATA", str(tmp_path))
monkeypatch.setattr(agenda.trip, "build_trip_list", lambda: [])
items = web_view.build_conference_list()
items = agenda.conference_list.build_conference_list(str(tmp_path), [])
assert [item["name"] for item in items] == ["FOSDEM 2027", "PyCascades 2027"]
assert items[0]["date_status"] == "tentative"