- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for _value (0.03 sec)
-
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) -
tests/test_openapi_examples.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 15.1K bytes - Viewed (0) -
tests/test_compat.py
return { "value": req.value or None, "embedded_value": req.embedded_model.value or None, } client = TestClient(app) response = client.post("/", json={}) assert response.status_code == 200, response.text assert response.json() == { "value": None, "embedded_value": None, } response2 = client.post(Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 4.2K bytes - Viewed (0) -
fastapi/datastructures.py
It's used internally to recognize when a default value has been overwritten, even if the overridden default value was truthy. """ def __init__(self, value: Any): self.value = value def __bool__(self) -> bool: return bool(self.value) def __eq__(self, o: object) -> bool: return isinstance(o, DefaultPlaceholder) and o.value == self.value DefaultType = TypeVar("DefaultType")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 5.1K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
def test_decimal_encoder_float(): data = {"value": Decimal(1.23)} assert jsonable_encoder(data) == {"value": 1.23} def test_decimal_encoder_int(): data = {"value": Decimal(2)} assert jsonable_encoder(data) == {"value": 2} def test_decimal_encoder_nan(): data = {"value": Decimal("NaN")} assert isnan(jsonable_encoder(data)["value"]) def test_decimal_encoder_infinity():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 9.2K bytes - Viewed (0) -
fastapi/param_functions.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 63K bytes - Viewed (0) -
fastapi/_compat/v2.py
continue if isinstance(value, dict): new_schema[key] = _replace_refs( schema=value, old_name_to_new_name_map=old_name_to_new_name_map, ) elif isinstance(value, list): new_value = [] for item in value: if isinstance(item, dict): new_item = _replace_refs(Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 19.1K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial002.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4.7K bytes - Viewed (0) -
tests/test_union_body_discriminator.py
response = client.post("/items/?q=first", json={"value": "first", "price": 100}) assert response.status_code == 200, response.text assert response.json() == {"item": {"value": "first", "price": 100}} response = client.post("/items/?q=other", json={"value": "other", "price": 100.5}) assert response.status_code == 200, response.text assert response.json() == {"item": {"value": "other", "price": 100.5}}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 7.1K bytes - Viewed (0) -
fastapi/encoders.py
if exclude is not None: allowed_keys -= set(exclude) for key, value in obj.items(): if ( ( not sqlalchemy_safe or (not isinstance(key, str)) or (not key.startswith("_sa")) ) and (value is not None or not exclude_none) and key in allowed_keys ):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 10.7K bytes - Viewed (0)