Home / Function/ test_post_authors_item() — fastapi Function Reference

test_post_authors_item() — fastapi Function Reference

Architecture documentation for the test_post_authors_item() function in test_tutorial003.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  7f40e250_2c7b_8665_069b_5198b8cd6a0f["test_post_authors_item()"]
  0ddb71bd_418e_8778_fee5_bc2e95bdce48["test_tutorial003.py"]
  7f40e250_2c7b_8665_069b_5198b8cd6a0f -->|defined in| 0ddb71bd_418e_8778_fee5_bc2e95bdce48
  style 7f40e250_2c7b_8665_069b_5198b8cd6a0f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_dataclasses/test_tutorial003.py lines 25–37

def test_post_authors_item(client: TestClient):
    response = client.post(
        "/authors/foo/items/",
        json=[{"name": "Bar"}, {"name": "Baz", "description": "Drop the Baz"}],
    )
    assert response.status_code == 200
    assert response.json() == {
        "name": "foo",
        "items": [
            {"name": "Bar", "description": None},
            {"name": "Baz", "description": "Drop the Baz"},
        ],
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free