- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 20 for test_root (1.55 seconds)
-
tests/test_tutorial/test_async_tests/test_main_a.py
import pytest from docs_src.async_tests.app_a_py310.test_main import test_root @pytest.mark.anyio async def test_async_testing():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 155 bytes - Click Count (0) -
docs_src/async_tests/app_a_py310/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 == 200Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 360 bytes - Click Count (0) -
tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py
async def create_item( token: str | None = 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"}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 6.6K bytes - Click Count (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()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 1.8K bytes - Click Count (0) -
src/test/java/jcifs/SmbTransportPoolTest.java
// When SmbTransport result = transportPool.getSmbTransport(context, TEST_HOST, DEFAULT_PORT, false, false); // Then assertNotNull(result); assertEquals(transport, result); verify(transportPool).getSmbTransport(context, TEST_HOST, DEFAULT_PORT, false, false); }Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 22.6K bytes - Click Count (0) -
build-tools-internal/src/main/groovy/org/elasticsearch/gradle/internal/doc/DocsTestPlugin.groovy
defaultSubstitutions = commonDefaultSubstitutions testRoot.convention(restRootDir) } // TODO: This effectively makes testRoot not customizable, which we don't do anyway atm project.sourceSets.test.output.dir(restRootDir, builtBy: buildRestTests) }Created: Wed Apr 08 16:19:15 GMT 2026 - Last Modified: Tue Jun 01 09:19:30 GMT 2021 - 3.6K bytes - Click Count (0) -
build-tools-internal/src/main/groovy/org/elasticsearch/gradle/internal/doc/RestTestsFromSnippetsTask.groovy
* Root directory of the tests being generated. To make rest tests happy * we generate them in a testRoot which is contained in this directory. */ private DirectoryProperty testRoot @Internal Set<String> names = new HashSet<>() @Inject RestTestsFromSnippetsTask(ObjectFactory objectFactory) { testRoot = objectFactory.directoryProperty() TestBuilder builder = new TestBuilder()Created: Wed Apr 08 16:19:15 GMT 2026 - Last Modified: Tue Jun 01 09:19:30 GMT 2021 - 19.5K bytes - Click Count (0) -
tests/test_generate_unique_id_function.py
app = FastAPI(generate_unique_id_function=custom_generate_unique_id) router = APIRouter() @app.post("/", response_model=list[Item], responses={404: {"model": list[Message]}}) def post_root(item1: Item, item2: Item): return item1, item2 # pragma: nocover @router.post( "/router", response_model=list[Item], responses={404: {"model": list[Message]}} )
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 75K bytes - Click Count (0) -
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/TestingConventionsTasks.java
Created: Wed Apr 08 16:19:15 GMT 2026 - Last Modified: Tue Jun 01 09:19:30 GMT 2021 - 17.6K bytes - Click Count (0) -
tests/test_top_level_security_scheme_in_openapi.py
from fastapi.testclient import TestClient from inline_snapshot import snapshot app = FastAPI() bearer_scheme = HTTPBearer() @app.get("/", dependencies=[Depends(bearer_scheme)]) async def get_root(): return {"message": "Hello, World!"} client = TestClient(app) def test_get_root(): response = client.get("/", headers={"Authorization": "Bearer token"})
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 1.9K bytes - Click Count (0)