Home / Function/ test_post_with_tax() — fastapi Function Reference

test_post_with_tax() — fastapi Function Reference

Architecture documentation for the test_post_with_tax() function in test_tutorial002.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  959fa14d_e4e9_d019_8a56_c576657bb897["test_post_with_tax()"]
  5117cad8_24a2_6a36_282a_60e4a522de6b["test_tutorial002.py"]
  959fa14d_e4e9_d019_8a56_c576657bb897 -->|defined in| 5117cad8_24a2_6a36_282a_60e4a522de6b
  style 959fa14d_e4e9_d019_8a56_c576657bb897 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_body/test_tutorial002.py lines 26–38

def test_post_with_tax(client: TestClient, price: Union[str, float]):
    response = client.post(
        "/items/",
        json={"name": "Foo", "price": price, "description": "Some Foo", "tax": 0.3},
    )
    assert response.status_code == 200
    assert response.json() == {
        "name": "Foo",
        "price": 50.5,
        "description": "Some Foo",
        "tax": 0.3,
        "price_with_tax": 50.8,
    }

Domain

Subdomains

Frequently Asked Questions

What does test_post_with_tax() do?
test_post_with_tax() is a function in the fastapi codebase, defined in tests/test_tutorial/test_body/test_tutorial002.py.
Where is test_post_with_tax() defined?
test_post_with_tax() is defined in tests/test_tutorial/test_body/test_tutorial002.py at line 26.

Analyze Your Own Codebase

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

Try Supermodel Free