Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for test_redirect_response_class (0.07 sec)

  1. tests/test_tutorial/test_custom_response/test_tutorial006b.py

    from fastapi.testclient import TestClient
    
    from docs_src.custom_response.tutorial006b_py39 import app
    
    client = TestClient(app)
    
    
    def test_redirect_response_class():
        response = client.get("/fastapi", follow_redirects=False)
        assert response.status_code == 307
        assert response.headers["location"] == "https://fastapi.tiangolo.com"
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 904 bytes
    - Viewed (0)
Back to top