Home / Function/ test_post_id_foo() — fastapi Function Reference

test_post_id_foo() — fastapi Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  9d374283_ec86_db8d_94cf_bac4e1d5eefb["test_post_id_foo()"]
  a55fd08b_c04c_97f2_efca_060f542ca1af["test_tutorial002.py"]
  9d374283_ec86_db8d_94cf_bac4e1d5eefb -->|defined in| a55fd08b_c04c_97f2_efca_060f542ca1af
  style 9d374283_ec86_db8d_94cf_bac4e1d5eefb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_body_multiple_params/test_tutorial002.py lines 177–195

def test_post_id_foo(client: TestClient):
    response = client.put(
        "/items/foo",
        json={
            "item": {"name": "Foo", "price": 50.5},
            "user": {"username": "johndoe"},
        },
    )
    assert response.status_code == 422
    assert response.json() == {
        "detail": [
            {
                "type": "int_parsing",
                "loc": ["path", "item_id"],
                "msg": "Input should be a valid integer, unable to parse string as an integer",
                "input": "foo",
            }
        ]
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free