Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for valeur (0.03 sec)

  1. tests/test_filter_pydantic_sub_model_pv2.py

            "tags": {"key1": "value1", "key2": "value2"},
        }
    
    
    def test_validator_is_cloned(client: TestClient):
        with pytest.raises(ResponseValidationError) as err:
            client.get("/model/modelX")
        assert err.value.errors() == [
            {
                "type": "value_error",
                "loc": ("response", "name"),
                "msg": "Value error, name must end in A",
                "input": "modelX",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.6K bytes
    - Viewed (0)
  2. fastapi/encoders.py

                set (and that only had their default values).
                """
            ),
        ] = False,
        exclude_defaults: Annotated[
            bool,
            Doc(
                """
                Pydantic's `exclude_defaults` parameter, passed to Pydantic models to define
                if it should exclude from the output the fields that had the same default
                value, even when they were explicitly set.
                """
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  3. fastapi/dependencies/utils.py

        if is_sequence_field(field) and isinstance(values, (ImmutableMultiDict, Headers)):
            value = values.getlist(alias)
        else:
            value = values.get(alias, None)
        if (
            value is None
            or (
                isinstance(field.field_info, params.Form)
                and isinstance(value, str)  # For type checks
                and value == ""
            )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 37.6K bytes
    - Viewed (3)
  4. fastapi/openapi/utils.py

                    # over non-required definitions
                    all_parameters.update(required_parameters)
                    operation["parameters"] = list(all_parameters.values())
                if method in METHODS_WITH_BODY:
                    request_body_oai = get_openapi_operation_request_body(
                        body_field=route.body_field,
                        model_name_map=model_name_map,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 23.2K bytes
    - Viewed (0)
  5. tests/test_openapi_examples.py

                "Example One": {
                    "summary": "Example One Summary",
                    "description": "Example One Description",
                    "value": {"data": "Data in Body examples, example1"},
                },
                "Example Two": {
                    "value": {"data": "Data in Body examples, example2"},
                },
            },
        ),
    ):
        return item
    
    
    @app.get("/path_examples/{item_id}")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  6. tests/test_response_model_as_return_annotation.py

        assert "missing" in str(excinfo.value)
    
    
    def test_response_model_no_annotation_return_invalid_model():
        with pytest.raises(ResponseValidationError) as excinfo:
            client.get("/response_model-no_annotation-return_invalid_model")
        assert "missing" in str(excinfo.value)
    
    
    def test_response_model_no_annotation_return_dict_with_extra_data():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 47.7K bytes
    - Viewed (0)
  7. tests/test_security_oauth2.py

                    "input": None,
                }
            ]
        }
    
    
    @pytest.mark.parametrize(
        argnames=["grant_type"],
        argvalues=[
            pytest.param("incorrect", id="incorrect value"),
            pytest.param("passwordblah", id="password with suffix"),
            pytest.param("blahpassword", id="password with prefix"),
        ],
    )
    def test_strict_login_incorrect_grant_type(grant_type: str):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9K bytes
    - Viewed (0)
  8. tests/test_security_oauth2_optional_description.py

                    "input": None,
                }
            ]
        }
    
    
    @pytest.mark.parametrize(
        argnames=["grant_type"],
        argvalues=[
            pytest.param("incorrect", id="incorrect value"),
            pytest.param("passwordblah", id="password with suffix"),
            pytest.param("blahpassword", id="password with prefix"),
        ],
    )
    def test_strict_login_incorrect_grant_type(grant_type: str):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.1K bytes
    - Viewed (0)
Back to top