Home / Function/ test_redirect_slashes_disabled() — fastapi Function Reference

test_redirect_slashes_disabled() — fastapi Function Reference

Architecture documentation for the test_redirect_slashes_disabled() function in test_router_redirect_slashes.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  03118dda_9f69_ef41_a43d_54a2bd3b132c["test_redirect_slashes_disabled()"]
  9571fa53_d8df_c88f_e0ba_c0a461963893["test_router_redirect_slashes.py"]
  03118dda_9f69_ef41_a43d_54a2bd3b132c -->|defined in| 9571fa53_d8df_c88f_e0ba_c0a461963893
  style 03118dda_9f69_ef41_a43d_54a2bd3b132c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_router_redirect_slashes.py lines 24–40

def test_redirect_slashes_disabled():
    app = FastAPI(redirect_slashes=False)
    router = APIRouter()

    @router.get("/hello/")
    def hello_page() -> str:
        return "Hello, World!"

    app.include_router(router)

    client = TestClient(app)

    response = client.get("/hello/", follow_redirects=False)
    assert response.status_code == 200

    response = client.get("/hello", follow_redirects=False)
    assert response.status_code == 404

Domain

Subdomains

Frequently Asked Questions

What does test_redirect_slashes_disabled() do?
test_redirect_slashes_disabled() is a function in the fastapi codebase, defined in tests/test_router_redirect_slashes.py.
Where is test_redirect_slashes_disabled() defined?
test_redirect_slashes_disabled() is defined in tests/test_router_redirect_slashes.py at line 24.

Analyze Your Own Codebase

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

Try Supermodel Free