Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for test_get_custom_response (0.33 sec)

  1. tests/test_tutorial/test_custom_response/test_tutorial001.py

        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.custom_response.{request.param}")
        client = TestClient(mod.app)
        return client
    
    
    def test_get_custom_response(client: TestClient):
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [{"item_id": "Foo"}]
    
    
    def test_openapi_schema(client: TestClient):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_custom_response/test_tutorial002_tutorial003_tutorial004.py

    html_contents = """
        <html>
            <head>
                <title>Some HTML in here</title>
            </head>
            <body>
                <h1>Look ma! HTML!</h1>
            </body>
        </html>
        """
    
    
    def test_get_custom_response(client: TestClient):
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.text == html_contents
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.8K bytes
    - Viewed (0)
Back to top