Rename some endpoints
Test python action / test (push) Successful in 45s
Check flake syntax / flake-check (push) Successful in 2m28s

This commit is contained in:
2026-11-22 13:57:07 +01:00
parent 4adf1c49f5
commit 03a08c7328
2 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -14,12 +14,12 @@ calendar_router = APIRouter(
)
@calendar_router.get("/isActive")
@calendar_router.get("/status")
def cal_is_active():
return get_caldav_handler() is not None
@calendar_router.get("/calGetActiveEvents")
@calendar_router.get("/activeEvents")
def cal_get_active_events():
handler = get_caldav_handler()
if handler is None:
@@ -27,7 +27,7 @@ def cal_get_active_events():
return handler.get_active_events()
@calendar_router.get("/calGetFutureEvents")
@calendar_router.get("/futureEvents")
def cal_get_future_events():
handler = get_caldav_handler()
if handler is None:
@@ -35,7 +35,7 @@ def cal_get_future_events():
return handler.get_future_events()
@calendar_router.get("/calGetActiveGroups")
@calendar_router.get("/activeGroups")
def cal_get_active_groups():
handler = get_caldav_handler()
if handler is None:
+5 -5
View File
@@ -57,13 +57,13 @@ def test_calendar_routes_are_registered():
def test_calendar_is_active_requires_admin(client):
response = client.get("/api/v1/calendar/isActive")
response = client.get("/api/v1/calendar/status")
assert response.status_code == 401, response.text
def test_calendar_is_active_reports_disabled_handler(client, auth_headers):
"""With DISABLE_CALDAV=True the handler is None, so isActive must be false."""
response = client.get("/api/v1/calendar/isActive", headers=auth_headers)
response = client.get("/api/v1/calendar/status", headers=auth_headers)
assert response.status_code == 200, response.text
assert response.json() is False
@@ -71,9 +71,9 @@ def test_calendar_is_active_reports_disabled_handler(client, auth_headers):
@pytest.mark.parametrize(
"path",
[
"/api/v1/calendar/calGetActiveEvents",
"/api/v1/calendar/calGetFutureEvents",
"/api/v1/calendar/calGetActiveGroups",
"/api/v1/calendar/activeEvents",
"/api/v1/calendar/futureEvents",
"/api/v1/calendar/activeGroups",
],
)
def test_calendar_diagnostics_without_handler_are_503(client, auth_headers, path):