Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for test_partial (0.13 seconds)

  1. tests/test_callable_endpoint.py

    def main(some_arg, q: str | None = None):
        return {"some_arg": some_arg, "q": q}
    
    
    endpoint = partial(main, "foo")
    
    app = FastAPI()
    
    app.get("/")(endpoint)
    
    
    client = TestClient(app)
    
    
    def test_partial():
        response = client.get("/?q=bar")
        data = response.json()
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 426 bytes
    - Click Count (0)
Back to Top