Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for test_exception_handler_body_access (0.1 sec)

  1. tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py

        client = TestClient(mod.app)
        return client
    
    
    def test_endpoint_works(client: TestClient):
        response = client.post("/", json=[1, 2, 3])
        assert response.json() == 6
    
    
    def test_exception_handler_body_access(client: TestClient):
        response = client.post("/", json={"numbers": [1, 2, 3]})
        assert response.json() == {
            "detail": {
                "errors": [
                    {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 1.3K bytes
    - Viewed (0)
Back to top