Home / Function/ test_required_str_missing() — fastapi Function Reference

test_required_str_missing() — fastapi Function Reference

Architecture documentation for the test_required_str_missing() function in test_required_str.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  f0d6b2cd_c061_1d3c_d9d8_665ac86088bb["test_required_str_missing()"]
  45768896_4720_0ffe_18a6_a9be9369e316["test_required_str.py"]
  f0d6b2cd_c061_1d3c_d9d8_665ac86088bb -->|defined in| 45768896_4720_0ffe_18a6_a9be9369e316
  style f0d6b2cd_c061_1d3c_d9d8_665ac86088bb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_request_params/test_form/test_required_str.py lines 53–66

def test_required_str_missing(path: str):
    client = TestClient(app)
    response = client.post(path)
    assert response.status_code == 422
    assert response.json() == {
        "detail": [
            {
                "type": "missing",
                "loc": ["body", "p"],
                "msg": "Field required",
                "input": IsOneOf(None, {}),
            }
        ]
    }

Domain

Subdomains

Frequently Asked Questions

What does test_required_str_missing() do?
test_required_str_missing() is a function in the fastapi codebase, defined in tests/test_request_params/test_form/test_required_str.py.
Where is test_required_str_missing() defined?
test_required_str_missing() is defined in tests/test_request_params/test_form/test_required_str.py at line 53.

Analyze Your Own Codebase

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

Try Supermodel Free