feat: v4.2.0 - series blocks (add to all days, delete one/all in series); 37 tests
Some checks failed
Build & Push Docker / build (push) Has been cancelled

This commit is contained in:
2026-02-20 17:58:56 +01:00
parent b91f336c12
commit b494d29790
7 changed files with 165 additions and 12 deletions

View File

@@ -148,6 +148,24 @@ def test_swagger_docs(client):
assert r.status_code == 200
def test_series_id_accepted(client):
"""Blocks with series_id should be accepted by the validate endpoint."""
doc = {
"version": "1.0",
"event": {"title": "Series Test", "date_from": "2026-03-01", "date_to": "2026-03-02"},
"program_types": [{"id": "ws", "name": "Workshop", "color": "#FF0000"}],
"blocks": [
{"id": "b1", "date": "2026-03-01", "start": "09:00", "end": "10:00",
"title": "Morning", "type_id": "ws", "series_id": "s_001"},
{"id": "b2", "date": "2026-03-02", "start": "09:00", "end": "10:00",
"title": "Morning", "type_id": "ws", "series_id": "s_001"},
]
}
r = client.post("/api/validate", json=doc)
assert r.status_code == 200
assert r.json()["valid"] is True
def test_backward_compat_date_field(client):
"""Old JSON with 'date' (not date_from/date_to) should still validate."""
doc = {