- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for post_root (0.04 sec)
-
tests/test_tutorial/test_async_tests/test_main_a.py
import pytest from docs_src.async_tests.app_a_py39.test_main import test_root @pytest.mark.anyio async def test_async_testing():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 154 bytes - Viewed (0) -
docs_src/async_tests/app_a_py39/test_main.py
import pytest from httpx import ASGITransport, AsyncClient from .main import app @pytest.mark.anyio async def test_root(): async with AsyncClient( transport=ASGITransport(app=app), base_url="http://test" ) as ac: response = await ac.get("/") assert response.status_code == 200Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 360 bytes - Viewed (0) -
tests/test_tutorial/test_conditional_openapi/test_tutorial001.py
response = client.get("/docs") assert response.status_code == 404, response.text response = client.get("/redoc") assert response.status_code == 404, response.text def test_root(): client = get_client() response = client.get("/") assert response.status_code == 200 assert response.json() == {"message": "Hello World"} def test_default_openapi(): client = get_client()
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 1.7K bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py
async def create_item( token: Optional[str] = Security(oauth2_scheme, scopes=["read", "write"]), ): return {"token": token} app.include_router(router) client = TestClient(app) def test_root(): response = client.get("/", headers={"Authorization": "Bearer testtoken"}) assert response.status_code == 200, response.text assert response.json() == {"message": "Hello World"}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6.6K bytes - Viewed (0)