From ea773b7bc7df6591ff7c0e538e2f96a11637657b Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 8 Sep 2021 17:32:46 -0400 Subject: [PATCH] CatsAndDogs corrected to CatOrDog --- tests/test_fields.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_fields.py b/tests/test_fields.py index 9b883e9..de1e4a7 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -569,13 +569,13 @@ class Dog: field = desert._fields.adjacently_tagged_union_from_registry(registry=registry) @dataclasses.dataclass - class CatsAndDogs: + class CatOrDog: union: t.Union[Cat, Dog] = desert.field(marshmallow_field=field) - schema = desert.schema(CatsAndDogs) + schema = desert.schema(CatOrDog) - with_a_cat = CatsAndDogs(union=Cat(name="Max", color="tuxedo")) - with_a_dog = CatsAndDogs(union=Dog(name="Bubbles", color="black spots on white")) + with_a_cat = CatOrDog(union=Cat(name="Max", color="tuxedo")) + with_a_dog = CatOrDog(union=Dog(name="Bubbles", color="black spots on white")) marshalled_cat = { "union": {"#type": "cat", "#value": {"name": "Max", "color": "tuxedo"}}