Skip to content

Commit ea6fbdc

Browse files
committed
fix: union test for 3.10
Signed-off-by: Erik Wrede <erikwrede2@gmail.com>
1 parent 778fbd7 commit ea6fbdc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graphene_sqlalchemy/tests/test_converter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ def prop_method_2() -> ShoppingCartType | PetType:
163163
field_type_1 = get_hybrid_property_type(prop_method).type
164164
field_type_2 = get_hybrid_property_type(prop_method_2).type
165165

166-
assert isinstance(field_type_1, graphene.Union)
166+
assert issubclass(field_type_1, graphene.Union)
167+
assert field_type_1._meta.types == [PetType, ShoppingCartType]
167168
assert field_type_1 is field_type_2
168169

169170

0 commit comments

Comments
 (0)