diff --git a/conftest.py b/conftest.py index abb8904835bf643d1ab790e66b2a31aed0ebef2b..13c0c646fdd34be3430278292ff69fe7674ccda5 100644 --- a/conftest.py +++ b/conftest.py @@ -174,7 +174,10 @@ def fallback_show() -> Show: @pytest.fixture def radio_settings(fallback_show) -> RadioSettings: return RadioSettingsFactory( - fallback_default_pool="Musikpool", fallback_show=fallback_show, station_name="Radio AURA" + fallback_default_pool="fallback", + fallback_show=fallback_show, + pools={"fallback": "Station Fallback Pool"}, + station_name="Radio AURA", ) diff --git a/program/tests/test_day_schedule.py b/program/tests/test_day_schedule.py index b81fe476187d2cddc898f941fce94b7ac7bf5919..e29c54339fc3708981a73225a83684fb12ed998a 100644 --- a/program/tests/test_day_schedule.py +++ b/program/tests/test_day_schedule.py @@ -44,9 +44,9 @@ def test_day_schedule(admin_api_client, api_client, once_rrule, show): entry = response.json()[0] - assert not entry["isVirtual"] - assert entry["showId"] == show.id - assert entry["showName"] == show.name + assert not entry["timeslot"]["isVirtual"] + assert entry["show"]["id"] == show.id + assert entry["show"]["name"] == show.name def test_day_schedule_include_virtual( @@ -65,11 +65,9 @@ def test_day_schedule_include_virtual( assert len(response.json()) == 3 for entry in response.json(): - if entry["isVirtual"]: - print("V") - assert entry["showId"] == fallback_show.id - assert entry["showName"] == fallback_show.name + if entry["timeslot"]["isVirtual"]: + assert entry["show"]["id"] == fallback_show.id + assert entry["show"]["name"] == fallback_show.name else: - print("R") - assert entry["showId"] == show.id - assert entry["showName"] == show.name + assert entry["show"]["id"] == show.id + assert entry["show"]["name"] == show.name diff --git a/program/tests/test_playout.py b/program/tests/test_playout.py index 766b5edcad6a41acfbbfab1340aeadf1e0b9f253..f1e6db062f809da4c2686810971b0f56e166f6d1 100644 --- a/program/tests/test_playout.py +++ b/program/tests/test_playout.py @@ -42,9 +42,9 @@ def test_playout(admin_api_client, api_client, daily_rrule, show): assert len(response.json()) == 7 for entry in response.json(): - assert not entry["isVirtual"] - assert entry["showId"] == show.id - assert entry["showName"] == show.name + assert not entry["timeslot"]["isVirtual"] + assert entry["show"]["id"] == show.id + assert entry["show"]["name"] == show.name def test_playout_include_virtual( @@ -63,9 +63,9 @@ def test_playout_include_virtual( assert len(response.json()) == 14 or 15 for entry in response.json(): - if entry["isVirtual"]: - assert entry["showId"] == fallback_show.id - assert entry["showName"] == fallback_show.name + if entry["timeslot"]["isVirtual"]: + assert entry["show"]["id"] == fallback_show.id + assert entry["show"]["name"] == fallback_show.name else: - assert entry["showId"] == show.id - assert entry["showName"] == show.name + assert entry["show"]["id"] == show.id + assert entry["show"]["name"] == show.name