Added subscription support. Fixed #35

This commit is contained in:
Syrus Akbary 2015-11-19 08:37:15 -08:00
parent b91ae4b0fb
commit b1d79c4f07
2 changed files with 2 additions and 0 deletions

View File

@ -89,6 +89,7 @@ def test_interface_objecttype_init_unexpected():
Human(object())
assert str(excinfo.value) == "Human received a non-compatible instance (object) when expecting Article"
def test_object_type():
object_type = schema.T(Human)
Human._meta.fields_map

View File

@ -79,6 +79,7 @@ class Field(OrderedType):
resolver = getattr(type_objecttype, 'mutate')
else:
my_resolver = resolver
@wraps(my_resolver)
def wrapped_func(instance, args, info):
if not isinstance(instance, self.object_type):