Tweak test for coverage

This commit is contained in:
Sebastián Ramírez 2025-12-12 15:22:14 +01:00
parent f75daed0a0
commit e0d987fee6
1 changed files with 2 additions and 3 deletions

View File

@ -26,9 +26,8 @@ def client_fixture() -> TestClient:
barks: float
def get_pet_type(v):
if isinstance(v, dict):
return v.get("pet_type", "")
return getattr(v, "pet_type", "")
assert isinstance(v, dict)
return v.get("pet_type", "")
Pet = Annotated[
Union[Annotated[Cat, Tag("cat")], Annotated[Dog, Tag("dog")]],