Browse Source

🎨 Auto format

pull/14446/head
pre-commit-ci-lite[bot] 8 months ago
committed by GitHub
parent
commit
ce0990107d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      tests/test_ast_inference.py

5
tests/test_ast_inference.py

@ -446,13 +446,14 @@ def test_infer_response_model_create_model_error():
func()
from fastapi.utils import PYDANTIC_V2
target = "pydantic.create_model" if PYDANTIC_V2 else "fastapi._compat.v1.create_model"
target = (
"pydantic.create_model" if PYDANTIC_V2 else "fastapi._compat.v1.create_model"
)
with patch(target, side_effect=Exception("Boom")):
assert infer_response_model_from_ast(func) is None
def test_contains_response() -> None:
from fastapi.routing import _contains_response

Loading…
Cancel
Save