rectified tests

This commit is contained in:
Kaushik ASP 2018-09-24 10:21:02 +05:30
parent 64b0828fe3
commit 7070aa80c7
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ class Dynamic(MountedType):
def __init__(self, type, with_schema=False, _creation_counter=None):
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
self.type = type
self.with_schema = with_schema

View File

@ -23,7 +23,7 @@ class Union(UnmountedType, BaseType):
@classmethod
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__))
_meta = UnionOptions(cls)
_meta.types = types