mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-29 09:19:49 +03:00
rectified tests
This commit is contained in:
parent
64b0828fe3
commit
7070aa80c7
|
@ -12,7 +12,7 @@ class Dynamic(MountedType):
|
||||||
|
|
||||||
def __init__(self, type, with_schema=False, _creation_counter=None):
|
def __init__(self, type, with_schema=False, _creation_counter=None):
|
||||||
super(Dynamic, self).__init__(_creation_counter=_creation_counter)
|
super(Dynamic, self).__init__(_creation_counter=_creation_counter)
|
||||||
if not inspect.isfunction(type) or isinstance(type, partial):
|
if not (inspect.isfunction(type) or isinstance(type, partial)):
|
||||||
raise AssertionError
|
raise AssertionError
|
||||||
self.type = type
|
self.type = type
|
||||||
self.with_schema = with_schema
|
self.with_schema = with_schema
|
||||||
|
|
|
@ -23,7 +23,7 @@ class Union(UnmountedType, BaseType):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __init_subclass_with_meta__(cls, types=None, **options):
|
def __init_subclass_with_meta__(cls, types=None, **options):
|
||||||
if not isinstance(types, (list, tuple)) and len(types) > 0:
|
if not (isinstance(types, (list, tuple)) and len(types) > 0):
|
||||||
raise AssertionError("Must provide types for Union {name}.".format(name=cls.__name__))
|
raise AssertionError("Must provide types for Union {name}.".format(name=cls.__name__))
|
||||||
_meta = UnionOptions(cls)
|
_meta = UnionOptions(cls)
|
||||||
_meta.types = types
|
_meta.types = types
|
||||||
|
|
Loading…
Reference in New Issue
Block a user