Home / Function/ test_create_item_bad_token() — fastapi Function Reference

test_create_item_bad_token() — fastapi Function Reference

Architecture documentation for the test_create_item_bad_token() function in test_main.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  85488c16_737e_6a4d_45fc_f27ff80ec3ed["test_create_item_bad_token()"]
  2f4620c4_6a2a_b4c4_1a8a_e4595526d698["test_main.py"]
  85488c16_737e_6a4d_45fc_f27ff80ec3ed -->|defined in| 2f4620c4_6a2a_b4c4_1a8a_e4595526d698
  style 85488c16_737e_6a4d_45fc_f27ff80ec3ed fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

docs_src/app_testing/app_b_an_py39/test_main.py lines 44–51

def test_create_item_bad_token():
    response = client.post(
        "/items/",
        headers={"X-Token": "hailhydra"},
        json={"id": "bazz", "title": "Bazz", "description": "Drop the bazz"},
    )
    assert response.status_code == 400
    assert response.json() == {"detail": "Invalid X-Token header"}

Domain

Subdomains

Frequently Asked Questions

What does test_create_item_bad_token() do?
test_create_item_bad_token() is a function in the fastapi codebase, defined in docs_src/app_testing/app_b_an_py39/test_main.py.
Where is test_create_item_bad_token() defined?
test_create_item_bad_token() is defined in docs_src/app_testing/app_b_an_py39/test_main.py at line 44.

Analyze Your Own Codebase

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

Try Supermodel Free