Home / Function/ test_put_missing_required_in_image() — fastapi Function Reference

test_put_missing_required_in_image() — fastapi Function Reference

Architecture documentation for the test_put_missing_required_in_image() function in test_tutorial004.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  55ea657f_a293_869f_649f_0258e7feb60c["test_put_missing_required_in_image()"]
  aae471ba_55e5_8e37_ca0d_9d433cc710ce["test_tutorial004.py"]
  55ea657f_a293_869f_649f_0258e7feb60c -->|defined in| aae471ba_55e5_8e37_ca0d_9d433cc710ce
  style 55ea657f_a293_869f_649f_0258e7feb60c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_body_nested_models/test_tutorial004.py lines 118–137

def test_put_missing_required_in_image(client: TestClient):
    response = client.put(
        "/items/5",
        json={
            "name": "Foo",
            "price": 35.4,
            "image": {"url": "http://example.com/image.png"},
        },
    )
    assert response.status_code == 422, response.text
    assert response.json() == {
        "detail": [
            {
                "loc": ["body", "image", "name"],
                "input": {"url": "http://example.com/image.png"},
                "msg": "Field required",
                "type": "missing",
            },
        ]
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free