Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 121 - 130 of 817 for defs (0.02 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_pydantic_v1_error.py

        from pydantic.v1 import BaseModel
    
    
    def test_raises_pydantic_v1_model_in_endpoint_param() -> None:
        class ParamModelV1(BaseModel):
            name: str
    
        app = FastAPI()
    
        with pytest.raises(PydanticV1NotSupportedError):
    
            @app.post("/param")
            def endpoint(data: ParamModelV1):  # pragma: no cover
                return data
    
    
    def test_raises_pydantic_v1_model_in_return_type() -> None:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 2.3K bytes
    - Click Count (0)
  2. tests/test_dependency_after_yield_raise.py

    
    class CustomError(Exception):
        pass
    
    
    def catching_dep() -> Any:
        try:
            yield "s"
        except CustomError as err:
            raise HTTPException(status_code=418, detail="Session error") from err
    
    
    def broken_dep() -> Any:
        yield "s"
        raise ValueError("Broken after yield")
    
    
    app = FastAPI()
    
    
    @app.get("/catching")
    def catching(d: Annotated[str, Depends(catching_dep)]) -> Any:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 1.7K bytes
    - Click Count (0)
  3. .ci/jobs.t/elastic+elasticsearch+pull-request+packaging-tests-unix-sample.yml

        description: "Testing of Elasticsearch pull requests - packaging-tests-unix-sample"
        project-type: matrix
        node: master
        scm:
          - git:
              refspec: "+refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*"
              branches:
                - "${ghprbActualCommit}"
        triggers:
          - github-pull-request:
              org-list:
                - elastic
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Thu Jul 01 20:27:05 GMT 2021
    - 1.8K bytes
    - Click Count (0)
  4. .ci/jobs.t/elastic+elasticsearch+pull-request+part-1-windows.yml

        node: "windows-immutable"
        workspace: "C:\\Users\\jenkins\\workspace\\pr-part-1\\${BUILD_NUMBER}"
        scm:
          - git:
              refspec: "+refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*"
              branches:
                - "${ghprbActualCommit}"
        triggers:
          - github-pull-request:
              org-list:
                - elastic
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Thu Jul 01 22:34:45 GMT 2021
    - 1.7K bytes
    - Click Count (0)
  5. docs/fr/docs/tutorial/request-form-models.md

    # Modèles de formulaire { #form-models }
    
    Vous pouvez utiliser des **modèles Pydantic** pour déclarer des **champs de formulaire** dans FastAPI.
    
    /// info
    
    Pour utiliser les formulaires, installez d'abord [`python-multipart`](https://github.com/Kludex/python-multipart).
    
    Assurez-vous de créer un [environnement virtuel](../virtual-environments.md), de l'activer, puis d'installer le paquet, par exemple :
    
    ```console
    $ pip install python-multipart
    ```
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 2.5K bytes
    - Click Count (0)
  6. tests/test_strict_content_type_nested.py

    
    @inner_strict.post("/items/")
    async def inner_strict_post(data: dict):
        return data
    
    
    @inner_default.post("/items/")
    async def inner_default_post(data: dict):
        return data
    
    
    outer_router.include_router(inner_strict)
    outer_router.include_router(inner_default)
    app_nested.include_router(outer_router)
    
    client_nested = TestClient(app_nested)
    
    
    def test_strict_inner_on_lax_app_rejects_no_content_type():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Feb 23 17:45:20 GMT 2026
    - 2.7K bytes
    - Click Count (0)
  7. build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/RestResourcesPluginFuncTest.groovy

        def "restResources does nothing when there are no tests"() {
            given:
            internalBuild()
            buildFile << """
                apply plugin: 'elasticsearch.java'
                apply plugin: 'elasticsearch.rest-resources'
            """
    
            String api = "foo.json"
            setupRestResources([api])
    
            when:
            def result = gradleRunner("copyRestApiSpecsTask").build()
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Tue Jul 20 21:05:16 GMT 2021
    - 7K bytes
    - Click Count (0)
  8. build-logic/binary-compatibility/src/main/groovy/gradlebuild.binary-compatibility.gradle

    // is the "main" one that is also shown in HTML report
    def apiChangesJsonDirectory = layout.projectDirectory.dir("src/changes/accepted-changes")
    
    def compatibilityBaselineVersion = gradleModule.identity.releasedVersions.get().mostRecentRelease.version
    
    def ARTIFACT_TYPE = Attribute.of('artifactType', String)
    def RUNTIME_ATTRIBUTE = objects.named(Usage, Usage.JAVA_RUNTIME)
    def DOCUMENTATION_ATTRIBUTE = objects.named(Category, Category.DOCUMENTATION)
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Tue Dec 30 10:14:25 GMT 2025
    - 8.9K bytes
    - Click Count (0)
  9. build-logic/build-update-utils/src/test/groovy/gradlebuild/buildutils/tasks/UpdateReleasedVersionsIntegrationTest.groovy

    class UpdateReleasedVersionsIntegrationTest extends Specification {
    
        def format = new SimpleDateFormat('yyyyMMddHHmmssZ')
    
        @TempDir
        File tmpDir
    
        def setup() {
            format.timeZone = TimeZone.getTimeZone("UTC")
        }
    
        def "updated released version file has expected format"() {
            given:
            def releasedVersionsFile = new File(tmpDir, "released-versions.json")
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Mon Mar 23 14:47:12 GMT 2026
    - 2.4K bytes
    - Click Count (0)
  10. tests/test_computed_fields.py

        @app.get("/")
        def read_root() -> Rectangle:
            return Rectangle(width=3, length=4)
    
        @app.get("/responses", responses={200: {"model": Rectangle}})
        def read_responses() -> Rectangle:
            return Rectangle(width=3, length=4)
    
        client = TestClient(app)
        return client
    
    
    @pytest.mark.parametrize("client", [True, False], indirect=True)
    @pytest.mark.parametrize("path", ["/", "/responses"])
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 3.8K bytes
    - Click Count (0)
Back to Top