- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 275 for raises (0.05 sec)
-
tests/test_ambiguous_params.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Dec 12 00:22:47 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_dependency_contextmanager.py
assert state["/async_raise"] == "asyncgen raise not started" with pytest.raises(OtherDependencyError): client.get("/async_raise_other") assert state["/async_raise"] == "asyncgen raise finalized" assert "/async_raise" not in errors def test_sync_raise_other(): assert state["/sync_raise"] == "generator raise not started" with pytest.raises(OtherDependencyError):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 11.6K bytes - Viewed (0) -
tests/test_multipart_installation.py
with warnings.catch_warnings(record=True): warnings.simplefilter("always") monkeypatch.delattr("multipart.multipart.parse_options_header", raising=False) with pytest.raises(RuntimeError, match=multipart_incorrect_install_error): app = FastAPI() @app.post("/") async def root(username: str = Form()): return username # pragma: nocover
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 21:46:26 UTC 2024 - 5.7K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008d_an_py39.py
assert response.json() == "plumbus" @needs_py39 def test_internal_error(client: TestClient): from docs_src.dependencies.tutorial008d_an_py39 import InternalError with pytest.raises(InternalError) as exc_info: client.get("/items/portal-gun") assert ( exc_info.value.args[0] == "The portal gun is too dangerous to be owned by Rick" ) @needs_py39
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.3K bytes - Viewed (0) -
tests/test_inherited_custom_class.py
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 Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 3K bytes - Viewed (0) -
tests/test_fastapi_cli.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 02 06:03:05 UTC 2024 - 790 bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c_an_py39.py
response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus" @needs_py39 def test_fastapi_error(client: TestClient): with pytest.raises(FastAPIError) as exc_info: client.get("/items/portal-gun") assert "No response object was returned" in exc_info.value.args[0] @needs_py39 def test_internal_server_error():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c.py
response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus" def test_fastapi_error(client: TestClient): with pytest.raises(FastAPIError) as exc_info: client.get("/items/portal-gun") assert "No response object was returned" in exc_info.value.args[0] def test_internal_server_error():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.1K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
class DictablePet(Pet): def __iter__(self): return ((k, v) for k, v in self.__dict__.items()) class Unserializable: def __iter__(self): raise NotImplementedError() @property def __dict__(self): raise NotImplementedError() class RoleEnum(Enum): admin = "admin" normal = "normal" class ModelWithConfig(BaseModel): role: Optional[RoleEnum] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 9K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c_an.py
response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus" def test_fastapi_error(client: TestClient): with pytest.raises(FastAPIError) as exc_info: client.get("/items/portal-gun") assert "No response object was returned" in exc_info.value.args[0] def test_internal_server_error():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.1K bytes - Viewed (0)