feat: update status codes and navigation structure in calculations and reports routes

This commit is contained in:
2025-11-13 17:14:17 +01:00
parent 522b1e4105
commit ed8e05147c
8 changed files with 462 additions and 36 deletions

View File

@@ -90,9 +90,9 @@ class TestAuthenticationRequirements:
def test_ui_project_list_requires_login(self, client, auth_session_context):
with auth_session_context(None):
response = client.get("/projects/ui")
assert response.status_code == status.HTTP_401_UNAUTHORIZED
response = client.get("/projects/ui", follow_redirects=False)
assert response.status_code == status.HTTP_303_SEE_OTHER
assert response.headers["location"].endswith("/login")
class TestRoleRestrictions:
@@ -194,7 +194,7 @@ class TestRoleRestrictions:
assert response.status_code == status.HTTP_403_FORBIDDEN
assert response.json()[
"detail"] == "Insufficient role permissions for this action."
"detail"] == "Insufficient permissions for this action."
def test_ui_project_edit_accessible_to_manager(
self,