- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for rapides (0.04 sec)
-
tests/test_pydantic_v1_error.py
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: class ReturnModelV1(BaseModel): name: str app = FastAPI() with pytest.raises(PydanticV1NotSupportedError): @app.get("/return")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 2.3K bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial003.py
import pytest from docs_src.python_types.tutorial003_py39 import get_name_with_age def test_get_name_with_age_pass_int(): with pytest.raises(TypeError): get_name_with_age("John", 30) def test_get_name_with_age_pass_str():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 308 bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial009c.py
return mod def test_say_hi(module: ModuleType): with patch("builtins.print") as mock_print: module.say_hi("FastAPI") mock_print.assert_called_once_with("Hey FastAPI!") with pytest.raises( TypeError, match=re.escape("say_hi() missing 1 required positional argument: 'name'"), ):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 777 bytes - Viewed (0) -
tests/test_tutorial/test_settings/test_app01.py
monkeypatch.delenv("ADMIN_EMAIL", raising=False) if mod_name in sys.modules: del sys.modules[mod_name] # pragma: no cover with pytest.raises(ValidationError) as exc_info: importlib.import_module(mod_name) assert exc_info.value.errors() == [ { "loc": ("admin_email",), "msg": "Field required",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 2.2K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
name: str data = ModelV1(name="test") with pytest.raises(PydanticV1NotSupportedError): jsonable_encoder(data) def test_encode_model_with_config(): model = ModelWithConfig(role=RoleEnum.admin) assert jsonable_encoder(model) == {"role": "admin"} def test_encode_model_with_alias_raises(): with pytest.raises(ValidationError): ModelWithAlias(foo="Bar")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 9.2K bytes - Viewed (0) -
tests/test_response_model_as_return_annotation.py
def test_response_model_no_annotation_return_invalid_dict(): with pytest.raises(ResponseValidationError) as excinfo: client.get("/response_model-no_annotation-return_invalid_dict") assert "missing" in str(excinfo.value) def test_response_model_no_annotation_return_invalid_model(): with pytest.raises(ResponseValidationError) as excinfo:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 47.7K bytes - Viewed (0) -
tests/test_inherited_custom_class.py
def return_fast_uuid(): asyncpg_uuid = MyUuid("a10ff360-3b1e-4984-a26f-d3ab460bdb51") assert isinstance(asyncpg_uuid, uuid.UUID) assert type(asyncpg_uuid) is not uuid.UUID with pytest.raises(TypeError): vars(asyncpg_uuid) return {"fast_uuid": asyncpg_uuid} class SomeCustomClass(BaseModel): model_config = {"arbitrary_types_allowed": True} a_uuid: MyUuid
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 1.8K bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model_pv2.py
"description": "model-a-desc", "foo": {"username": "test-user"}, "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"),
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 6.6K bytes - Viewed (0) -
pyproject.toml
'ignore:datetime\.datetime\.utcfromtimestamp\(\) is deprecated and scheduled for removal in a future version\..*:DeprecationWarning:sqlalchemy', # Trio 24.1.0 raises a warning from attrs # Ref: https://github.com/python-trio/trio/pull/3054 # Remove once there's a new version of Trio 'ignore:The `hash` argument is deprecated*:DeprecationWarning:trio', ]Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 9.3K bytes - Viewed (0) -
fastapi/routing.py
], body=e.doc, endpoint_ctx=endpoint_ctx, ) raise validation_error from e except HTTPException: # If a middleware raises an HTTPException, it should be raised again raise except Exception as e: http_error = HTTPException( status_code=400, detail="There was an error parsing the body"Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 174.6K bytes - Viewed (0)