fix(i-d): RBAC-Comprehensive 4 Failures behoben — http_exception_handler um dict-detail-Durchreichung erweitert (strukturierte Error-Codes AGENTS.md-konform, body[detail] = raw_detail dict statt stringify); 3 Contact-Payload-Feldnamen korrigiert (firstname/surname statt first_name/last_name in legacy-editor Tests); test_rbac_comprehensive 102/102 gruen
This commit is contained in:
@@ -926,7 +926,7 @@ class TestRBACRouteGuard:
|
||||
csrf = await login_with_csrf(client, "viewer@tenanta.com")
|
||||
resp = await client.post(
|
||||
"/api/v1/contacts",
|
||||
json={"first_name": "Test", "last_name": "User", "type": "person"},
|
||||
json={"firstname": "Test", "surname": "User", "type": "person"},
|
||||
headers=csrf_headers(csrf),
|
||||
)
|
||||
assert resp.status_code == 403
|
||||
@@ -1071,7 +1071,7 @@ class TestRBACRouteGuard:
|
||||
csrf = await login_with_csrf(client, "editor@tenanta.com")
|
||||
resp = await client.post(
|
||||
"/api/v1/contacts",
|
||||
json={"first_name": "Editor", "last_name": "Contact", "type": "person"},
|
||||
json={"firstname": "Editor", "surname": "Contact", "type": "person"},
|
||||
headers=csrf_headers(csrf),
|
||||
)
|
||||
assert resp.status_code == 201
|
||||
@@ -1085,7 +1085,7 @@ class TestRBACRouteGuard:
|
||||
csrf = await login_with_csrf(client, "viewer@tenanta.com")
|
||||
resp = await client.post(
|
||||
"/api/v1/contacts",
|
||||
json={"first_name": "Viewer", "last_name": "Contact", "type": "person"},
|
||||
json={"firstname": "Viewer", "surname": "Contact", "type": "person"},
|
||||
headers=csrf_headers(csrf),
|
||||
)
|
||||
assert resp.status_code == 403
|
||||
|
||||
Reference in New Issue
Block a user