Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 6 of 6 for test_path_operation (0.25 seconds)

  1. tests/test_additional_response_extra.py

    
    @sub_router.get("/")
    def read_item():
        return {"id": "foo"}
    
    
    router.include_router(sub_router, prefix="/items")
    
    app.include_router(router)
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == {"id": "foo"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 1.3K bytes
    - Click Count (0)
  2. tests/test_tutorial/test_additional_responses/test_tutorial002.py

        mod = importlib.import_module(f"docs_src.additional_responses.{request.param}")
    
        client = TestClient(mod.app)
        client.headers.clear()
        return client
    
    
    def test_path_operation(client: TestClient):
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"id": "foo", "value": "there goes my hero"}
    
    
    @workdir_lock
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 27 10:53:47 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  3. tests/test_tutorial/test_additional_responses/test_tutorial003.py

    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from docs_src.additional_responses.tutorial003_py310 import app
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"id": "foo", "value": "there goes my hero"}
    
    
    def test_path_operation_not_found():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  4. tests/test_tutorial/test_additional_responses/test_tutorial001.py

    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from docs_src.additional_responses.tutorial001_py310 import app
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"id": "foo", "value": "there goes my hero"}
    
    
    def test_path_operation_not_found():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 5.1K bytes
    - Click Count (0)
  5. tests/test_tutorial/test_additional_responses/test_tutorial004.py

        mod = importlib.import_module(f"docs_src.additional_responses.{request.param}")
    
        client = TestClient(mod.app)
        client.headers.clear()
        return client
    
    
    def test_path_operation(client: TestClient):
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"id": "foo", "value": "there goes my hero"}
    
    
    @workdir_lock
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 27 10:53:47 GMT 2026
    - 5.5K bytes
    - Click Count (0)
  6. tests/test_response_model_sub_types.py

    @app.get("/valid3", responses={"500": {"model": Model}})
    def valid3():
        pass
    
    
    @app.get("/valid4", responses={"500": {"model": list[Model]}})
    def valid4():
        pass
    
    
    client = TestClient(app)
    
    
    def test_path_operations():
        response = client.get("/valid1")
        assert response.status_code == 200, response.text
        response = client.get("/valid2")
        assert response.status_code == 200, response.text
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 5.8K bytes
    - Click Count (0)
Back to Top