- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for unicorn_name (0.04 sec)
-
docs_src/handling_errors/tutorial003_py39.py
) @app.get("/unicorns/{name}") async def read_unicorn(name: str): if name == "yolo": raise UnicornException(name=name)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 626 bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial003.py
client = TestClient(app) def test_get(): response = client.get("/unicorns/shinny") assert response.status_code == 200, response.text assert response.json() == {"unicorn_name": "shinny"} def test_get_exception(): response = client.get("/unicorns/yolo") assert response.status_code == 418, response.text assert response.json() == {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.2K bytes - Viewed (0)