Browse Source

🎨 Auto format

pull/14678/head
pre-commit-ci-lite[bot] 6 months ago
committed by GitHub
parent
commit
468548a73b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      tests/test_validate_response.py

7
tests/test_validate_response.py

@ -46,20 +46,21 @@ def get_invalidlist():
{"name": "baz", "price": "baz"},
]
# edge cases
@app.get("/items/invalidDict", response_model=Item)
def get_invalidDict():
return {"name":"invalid", "owner_ids":{"id":1}}
return {"name": "invalid", "owner_ids": {"id": 1}}
@app.get("/items/invalidtype", response_model=Item)
def get_invalidtype():
return {"name":3, "price": 2.7}
return {"name": 3, "price": 2.7}
@app.get("/items/invalidtuple", response_model=Item)
def get_invalid_typle():
return {"name":"invalid", "price":(2.5,3.5)}
return {"name": "invalid", "price": (2.5, 3.5)}
client = TestClient(app)

Loading…
Cancel
Save