Home / Function/ test_post_items() — fastapi Function Reference

test_post_items() — fastapi Function Reference

Architecture documentation for the test_post_items() function in test_tutorial001.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  013b98ef_6642_f87b_f5f7_0f0058eaa4ac["test_post_items()"]
  28db2887_4b14_4110_aac0_cd92a8f6b583["test_tutorial001.py"]
  013b98ef_6642_f87b_f5f7_0f0058eaa4ac -->|defined in| 28db2887_4b14_4110_aac0_cd92a8f6b583
  style 013b98ef_6642_f87b_f5f7_0f0058eaa4ac fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_path_operation_configurations/test_tutorial001.py lines 25–43

def test_post_items(client: TestClient):
    response = client.post(
        "/items/",
        json={
            "name": "Foo",
            "description": "Item description",
            "price": 42.0,
            "tax": 3.2,
            "tags": ["bar", "baz"],
        },
    )
    assert response.status_code == 201, response.text
    assert response.json() == {
        "name": "Foo",
        "description": "Item description",
        "price": 42.0,
        "tax": 3.2,
        "tags": IsList("bar", "baz", check_order=False),
    }

Domain

Subdomains

Frequently Asked Questions

What does test_post_items() do?
test_post_items() is a function in the fastapi codebase, defined in tests/test_tutorial/test_path_operation_configurations/test_tutorial001.py.
Where is test_post_items() defined?
test_post_items() is defined in tests/test_tutorial/test_path_operation_configurations/test_tutorial001.py at line 25.

Analyze Your Own Codebase

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

Try Supermodel Free