diff --git a/graphene/tests/issues/test_356.py b/graphene/tests/issues/test_356.py index 3755a8ef..9d8fc77b 100644 --- a/graphene/tests/issues/test_356.py +++ b/graphene/tests/issues/test_356.py @@ -21,9 +21,11 @@ class MyUnion(graphene.Union): def test_issue(): + class Query(graphene.ObjectType): + things = relay.ConnectionField(MyUnion) + with pytest.raises(Exception) as exc_info: - class Query(graphene.ObjectType): - things = relay.ConnectionField(MyUnion) + graphene.Schema(query=Query) assert str(exc_info.value) == ( 'IterableConnectionField type have to be a subclass of Connection. '