Home / Function/ test_broken_no_raise() — fastapi Function Reference

test_broken_no_raise() — fastapi Function Reference

Architecture documentation for the test_broken_no_raise() function in test_dependency_after_yield_raise.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  2c01ff8c_c4d4_2e1f_eb53_b87558f7c463["test_broken_no_raise()"]
  2213b42a_570d_4b49_233d_4031fcf3f00c["test_dependency_after_yield_raise.py"]
  2c01ff8c_c4d4_2e1f_eb53_b87558f7c463 -->|defined in| 2213b42a_570d_4b49_233d_4031fcf3f00c
  style 2c01ff8c_c4d4_2e1f_eb53_b87558f7c463 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_dependency_after_yield_raise.py lines 51–61

def test_broken_no_raise():
    """
    When a dependency with yield raises after the yield (not in an except), the
    response is already "successfully" sent back to the client, but there's still
    an error in the server afterwards, an exception is raised and captured or shown
    in the server logs.
    """
    with TestClient(app, raise_server_exceptions=False) as client:
        response = client.get("/broken")
        assert response.status_code == 200
        assert response.json() == {"message": "all good?"}

Domain

Subdomains

Frequently Asked Questions

What does test_broken_no_raise() do?
test_broken_no_raise() is a function in the fastapi codebase, defined in tests/test_dependency_after_yield_raise.py.
Where is test_broken_no_raise() defined?
test_broken_no_raise() is defined in tests/test_dependency_after_yield_raise.py at line 51.

Analyze Your Own Codebase

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

Try Supermodel Free