Home / Function/ test_put_only_required() — fastapi Function Reference

test_put_only_required() — fastapi Function Reference

Architecture documentation for the test_put_only_required() function in test_tutorial006.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  f524dfe7_6e91_3f8e_2410_2d0c665db6dc["test_put_only_required()"]
  b94050ac_a58d_457a_8756_02076d630f1f["test_tutorial006.py"]
  f524dfe7_6e91_3f8e_2410_2d0c665db6dc -->|defined in| b94050ac_a58d_457a_8756_02076d630f1f
  style f524dfe7_6e91_3f8e_2410_2d0c665db6dc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_body_nested_models/test_tutorial006.py lines 55–71

def test_put_only_required(client: TestClient):
    response = client.put(
        "/items/5",
        json={"name": "Foo", "price": 35.4},
    )
    assert response.status_code == 200, response.text
    assert response.json() == {
        "item_id": 5,
        "item": {
            "name": "Foo",
            "description": None,
            "price": 35.4,
            "tax": None,
            "tags": [],
            "images": None,
        },
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free