try:
yield "Rick"
except OwnerError as e:
- raise HTTPException(status_code=400, detail=f"Onwer error: {e}")
+ raise HTTPException(status_code=400, detail=f"Owner error: {e}")
@app.get("/items/{item_id}")
try:
yield "Rick"
except OwnerError as e:
- raise HTTPException(status_code=400, detail=f"Onwer error: {e}")
+ raise HTTPException(status_code=400, detail=f"Owner error: {e}")
@app.get("/items/{item_id}")
try:
yield "Rick"
except OwnerError as e:
- raise HTTPException(status_code=400, detail=f"Onwer error: {e}")
+ raise HTTPException(status_code=400, detail=f"Owner error: {e}")
@app.get("/items/{item_id}")
def test_owner_error():
response = client.get("/items/plumbus")
assert response.status_code == 400, response.text
- assert response.json() == {"detail": "Onwer error: Rick"}
+ assert response.json() == {"detail": "Owner error: Rick"}
def test_get_item():
def test_owner_error():
response = client.get("/items/plumbus")
assert response.status_code == 400, response.text
- assert response.json() == {"detail": "Onwer error: Rick"}
+ assert response.json() == {"detail": "Owner error: Rick"}
def test_get_item():
def test_owner_error():
response = client.get("/items/plumbus")
assert response.status_code == 400, response.text
- assert response.json() == {"detail": "Onwer error: Rick"}
+ assert response.json() == {"detail": "Owner error: Rick"}
def test_get_item():