Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug]: tests are failing #69

@Mr-Sunglasses

Description

@Mr-Sunglasses
   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

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions