-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
💻 aspect: codeConcerns the software code in the repositoryConcerns the software code in the repository🛠 goal: fixBug fixBug fix🟧 priority: highStalls work on the project or its dependentsStalls work on the project or its dependents
Description
def test_post_file_route_failure() -> None:
response = client.post("/file")
assert response.status_code == 422 # Unprocessable Entity
> assert response.json() == {
"detail": [
{
"type": "missing",
"loc": ["body", "file"],
"msg": "Field required",
"input": None,
"url": "https://errors.pydantic.dev/2.5/v/missing",
}
]
}
E AssertionError: assert {'detail': [{...: 'missing'}]} == {'detail': [{...ssing', ...}]}
E
E Differing items:
E {'detail': [{'input': None, 'loc': ['body', 'file'], 'msg': 'Field required', 'type': 'missing'}]} != {'detail': [{'input': None, 'loc': ['body', 'file'], 'msg': 'Field required', 'type': 'missing', ...}]}
E
E Full diff:
E {
E 'detail': [
E {
E 'input': None,
E 'loc': [
E 'body',
E 'file',
E ],
E 'msg': 'Field required',
E 'type': 'missing',
E - 'url': 'https://errors.pydantic.dev/2.5/v/missing',
E },
E ],
E }
Metadata
Metadata
Assignees
Labels
💻 aspect: codeConcerns the software code in the repositoryConcerns the software code in the repository🛠 goal: fixBug fixBug fix🟧 priority: highStalls work on the project or its dependentsStalls work on the project or its dependents