Home / Function/ test_post_all() — fastapi Function Reference

test_post_all() — fastapi Function Reference

Architecture documentation for the test_post_all() function in test_tutorial007.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  6a6a8a62_43ca_dc23_d882_c19fc394989f["test_post_all()"]
  2da9e1e5_bc5c_d40e_5c25_c8c53ba8521d["test_tutorial007.py"]
  6a6a8a62_43ca_dc23_d882_c19fc394989f -->|defined in| 2da9e1e5_bc5c_d40e_5c25_c8c53ba8521d
  style 6a6a8a62_43ca_dc23_d882_c19fc394989f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_body_nested_models/test_tutorial007.py lines 24–51

def test_post_all(client: TestClient):
    data = {
        "name": "Special Offer",
        "description": "This is a special offer",
        "price": 38.6,
        "items": [
            {
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
                "tags": ["foo"],
                "images": [
                    {
                        "url": "http://example.com/image.png",
                        "name": "example image",
                    }
                ],
            }
        ],
    }

    response = client.post(
        "/offers/",
        json=data,
    )
    assert response.status_code == 200, response.text
    assert response.json() == data

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free