Home / Function/ test_post_not_a_list() — fastapi Function Reference

test_post_not_a_list() — fastapi Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

tests/test_tutorial/test_body_nested_models/test_tutorial008.py lines 48–64

def test_post_not_a_list(client: TestClient):
    data = {"url": "http://example.com/", "name": "Example"}
    response = client.post("/images/multiple", json=data)
    assert response.status_code == 422, response.text
    assert response.json() == {
        "detail": [
            {
                "loc": ["body"],
                "input": {
                    "name": "Example",
                    "url": "http://example.com/",
                },
                "msg": "Input should be a valid list",
                "type": "list_type",
            }
        ]
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free