generated from john/python-template
This commit is contained in:
@@ -206,6 +206,15 @@ def test_document_person_link_requires_role_id(tmp_path):
|
||||
)
|
||||
|
||||
assert response.status_code == 422
|
||||
payload = response.json()
|
||||
assert "detail" in payload
|
||||
assert isinstance(payload["detail"], list)
|
||||
missing_role = [
|
||||
item
|
||||
for item in payload["detail"]
|
||||
if isinstance(item, dict) and item.get("loc") == ["body", "role_id"] and item.get("type") == "missing"
|
||||
]
|
||||
assert missing_role
|
||||
|
||||
|
||||
def test_duplicate_document_person_link_returns_conflict_envelope(tmp_path):
|
||||
|
||||
Reference in New Issue
Block a user