test_redirect_slashes_enabled() — fastapi Function Reference
Architecture documentation for the test_redirect_slashes_enabled() function in test_router_redirect_slashes.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 887ecd8c_d3db_dd58_0ec0_c5bf2159e861["test_redirect_slashes_enabled()"] 9571fa53_d8df_c88f_e0ba_c0a461963893["test_router_redirect_slashes.py"] 887ecd8c_d3db_dd58_0ec0_c5bf2159e861 -->|defined in| 9571fa53_d8df_c88f_e0ba_c0a461963893 style 887ecd8c_d3db_dd58_0ec0_c5bf2159e861 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_router_redirect_slashes.py lines 5–21
def test_redirect_slashes_enabled():
app = FastAPI()
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 == 307
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_redirect_slashes_enabled() do?
test_redirect_slashes_enabled() is a function in the fastapi codebase, defined in tests/test_router_redirect_slashes.py.
Where is test_redirect_slashes_enabled() defined?
test_redirect_slashes_enabled() is defined in tests/test_router_redirect_slashes.py at line 5.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free