- Sort Score
- Result 10 results
- Languages All
Results 21 - 23 of 23 for queryParams (0.06 sec)
-
tests/test_tutorial/test_query_params/test_tutorial005.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.query_params.tutorial005 import app client = TestClient(app) def test_foo_needy_very(): response = client.get("/items/foo?needy=very") assert response.status_code == 200 assert response.json() == {"item_id": "foo", "needy": "very"} def test_foo_no_needy(): response = client.get("/items/foo")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 4K bytes - Viewed (0) -
tests/test_tutorial/test_query_params/test_tutorial006_py310.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.query_params.tutorial006_py310 import app c = TestClient(app) return c @needs_py310 def test_foo_needy_very(client: TestClient): response = client.get("/items/foo?needy=very") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.2K bytes - Viewed (0) -
fastapi/security/api_key.py
) self.scheme_name = scheme_name or self.__class__.__name__ self.auto_error = auto_error async def __call__(self, request: Request) -> Optional[str]: api_key = request.query_params.get(self.model.name) if not api_key: if self.auto_error: raise HTTPException( status_code=HTTP_403_FORBIDDEN, detail="Not authenticated" )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 23 22:29:18 UTC 2024 - 9.1K bytes - Viewed (0)