Home / Function/ test_call_api() — fastapi Function Reference

test_call_api() — fastapi Function Reference

Architecture documentation for the test_call_api() function in test_schema_extra_examples.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  cea1ac2f_5bc4_157f_9f19_0ba228bd5bc6["test_call_api()"]
  3fe4836c_ae70_fc66_8f09_91aac47b55e8["test_schema_extra_examples.py"]
  cea1ac2f_5bc4_157f_9f19_0ba228bd5bc6 -->|defined in| 3fe4836c_ae70_fc66_8f09_91aac47b55e8
  562dc8b3_7513_1235_4e0a_83c83e613a74["create_app()"]
  cea1ac2f_5bc4_157f_9f19_0ba228bd5bc6 -->|calls| 562dc8b3_7513_1235_4e0a_83c83e613a74
  style cea1ac2f_5bc4_157f_9f19_0ba228bd5bc6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_schema_extra_examples.py lines 218–252

def test_call_api():
    app = create_app()
    client = TestClient(app)
    response = client.post("/schema_extra/", json={"data": "Foo"})
    assert response.status_code == 200, response.text
    response = client.post("/example/", json={"data": "Foo"})
    assert response.status_code == 200, response.text
    response = client.post("/examples/", json={"data": "Foo"})
    assert response.status_code == 200, response.text
    response = client.post("/example_examples/", json={"data": "Foo"})
    assert response.status_code == 200, response.text
    response = client.get("/path_example/foo")
    assert response.status_code == 200, response.text
    response = client.get("/path_examples/foo")
    assert response.status_code == 200, response.text
    response = client.get("/path_example_examples/foo")
    assert response.status_code == 200, response.text
    response = client.get("/query_example/")
    assert response.status_code == 200, response.text
    response = client.get("/query_examples/")
    assert response.status_code == 200, response.text
    response = client.get("/query_example_examples/")
    assert response.status_code == 200, response.text
    response = client.get("/header_example/")
    assert response.status_code == 200, response.text
    response = client.get("/header_examples/")
    assert response.status_code == 200, response.text
    response = client.get("/header_example_examples/")
    assert response.status_code == 200, response.text
    response = client.get("/cookie_example/")
    assert response.status_code == 200, response.text
    response = client.get("/cookie_examples/")
    assert response.status_code == 200, response.text
    response = client.get("/cookie_example_examples/")
    assert response.status_code == 200, response.text

Domain

Subdomains

Calls

Frequently Asked Questions

What does test_call_api() do?
test_call_api() is a function in the fastapi codebase, defined in tests/test_schema_extra_examples.py.
Where is test_call_api() defined?
test_call_api() is defined in tests/test_schema_extra_examples.py at line 218.
What does test_call_api() call?
test_call_api() calls 1 function(s): create_app.

Analyze Your Own Codebase

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

Try Supermodel Free