Home / Function/ test_post_invalid_list_item() — fastapi Function Reference

test_post_invalid_list_item() — fastapi Function Reference

Architecture documentation for the test_post_invalid_list_item() function in test_tutorial008.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  dfdb820c_f469_7420_4663_324fe2ec0227["test_post_invalid_list_item()"]
  8142d699_14d6_5e26_b39d_46e94b98e695["test_tutorial008.py"]
  dfdb820c_f469_7420_4663_324fe2ec0227 -->|defined in| 8142d699_14d6_5e26_b39d_46e94b98e695
  style dfdb820c_f469_7420_4663_324fe2ec0227 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_body_nested_models/test_tutorial008.py lines 31–45

def test_post_invalid_list_item(client: TestClient):
    data = [{"url": "not a valid url", "name": "Example"}]
    response = client.post("/images/multiple", json=data)
    assert response.status_code == 422, response.text
    assert response.json() == {
        "detail": [
            {
                "loc": ["body", 0, "url"],
                "input": "not a valid url",
                "msg": "Input should be a valid URL, relative URL without a base",
                "type": "url_parsing",
                "ctx": {"error": "relative URL without a base"},
            },
        ]
    }

Domain

Subdomains

Frequently Asked Questions

What does test_post_invalid_list_item() do?
test_post_invalid_list_item() is a function in the fastapi codebase, defined in tests/test_tutorial/test_body_nested_models/test_tutorial008.py.
Where is test_post_invalid_list_item() defined?
test_post_invalid_list_item() is defined in tests/test_tutorial/test_body_nested_models/test_tutorial008.py at line 31.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free