Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 9 of 9 for get_root (0.06 seconds)

  1. 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)
  2. tests/test_skip_defaults.py

    
    class ModelDefaults(BaseModel):
        w: str | None = None
        x: str | None = None
        y: str = "y"
        z: str = "z"
    
    
    @app.get("/", response_model=Model, response_model_exclude_unset=True)
    def get_root() -> ModelSubclass:
        return ModelSubclass(sub={}, y=1, z=0)
    
    
    @app.get(
        "/exclude_unset", response_model=ModelDefaults, response_model_exclude_unset=True
    )
    def get_exclude_unset() -> ModelDefaults:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 2K bytes
    - Click Count (0)
  3. src/test/java/org/codelibs/core/io/FileUtilTest.java

        }
    
        /**
         * Test isPathSafe with safe path
         *
         * @throws Exception
         */
        @Test
        public void testIsPathSafe_SafePath() throws Exception {
            final Path baseDir = tempFolder.getRoot().toPath();
            final Path safePath = baseDir.resolve("subdir/file.txt");
    
            assertTrue("Safe path should be allowed", FileUtil.isPathSafe(safePath, baseDir));
        }
    
        /**
    Created: Fri Apr 03 20:58:12 GMT 2026
    - Last Modified: Sat Nov 22 11:21:59 GMT 2025
    - 10.3K bytes
    - Click Count (0)
  4. 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)
  5. build-logic/documentation/src/main/groovy/gradlebuild/docs/GradleUserManualPlugin.java

                task.getDocumentationFiles().from(extension.getUserManual().getRoot());
                task.getDocumentationRoot().convention(extension.getUserManual().getRoot());
                task.getDestinationDirectory().convention(layout.getBuildDirectory().dir("tmp/" + task.getName()));
            });
    
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Thu Mar 12 22:33:18 GMT 2026
    - 17.8K bytes
    - Click Count (0)
  6. build-logic/documentation/src/main/groovy/gradlebuild/docs/UserManual.java

     */
    public abstract class UserManual {
        /**
         * The root of the user manual documentation.  This is the source of the adoc files.
         */
        public abstract DirectoryProperty getRoot();
    
        /**
         * Source of snippets that can be inserted into the user manual
         */
        public abstract DirectoryProperty getSnippets();
    
        /**
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Thu Mar 12 22:33:18 GMT 2026
    - 1.6K bytes
    - Click Count (0)
  7. 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)
  8. 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 == 200
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 360 bytes
    - Click Count (0)
  9. 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)
Back to Top