Home / Function/ test_no_content_type_is_json() — fastapi Function Reference

test_no_content_type_is_json() — fastapi Function Reference

Architecture documentation for the test_no_content_type_is_json() function in test_tutorial001.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  d9041c6c_fe2b_39c7_75b2_559003d607af["test_no_content_type_is_json()"]
  384ebf37_bf33_dd11_7410_101f39082f41["test_tutorial001.py"]
  d9041c6c_fe2b_39c7_75b2_559003d607af -->|defined in| 384ebf37_bf33_dd11_7410_101f39082f41
  style d9041c6c_fe2b_39c7_75b2_559003d607af fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_body/test_tutorial001.py lines 193–204

def test_no_content_type_is_json(client: TestClient):
    response = client.post(
        "/items/",
        content='{"name": "Foo", "price": 50.5}',
    )
    assert response.status_code == 200, response.text
    assert response.json() == {
        "name": "Foo",
        "description": None,
        "price": 50.5,
        "tax": None,
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free