mirror of https://github.com/tiangolo/fastapi.git
✅ Tweak test for coverage
This commit is contained in:
parent
f75daed0a0
commit
e0d987fee6
|
|
@ -26,9 +26,8 @@ def client_fixture() -> TestClient:
|
||||||
barks: float
|
barks: float
|
||||||
|
|
||||||
def get_pet_type(v):
|
def get_pet_type(v):
|
||||||
if isinstance(v, dict):
|
assert isinstance(v, dict)
|
||||||
return v.get("pet_type", "")
|
return v.get("pet_type", "")
|
||||||
return getattr(v, "pet_type", "")
|
|
||||||
|
|
||||||
Pet = Annotated[
|
Pet = Annotated[
|
||||||
Union[Annotated[Cat, Tag("cat")], Annotated[Dog, Tag("dog")]],
|
Union[Annotated[Cat, Tag("cat")], Annotated[Dog, Tag("dog")]],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue