Fixed options tests

This commit is contained in:
Syrus Akbary 2015-12-02 23:42:15 -08:00
parent f5837ac4f3
commit b417a65f19

View File

@ -1,11 +1,10 @@
from py.test import raises from py.test import raises
from graphene.core.fields import Field from graphene.core.fields import Field
from graphene.core.options import Options from graphene.core.classtypes import Options
class Meta: class Meta:
is_interface = True
type_name = 'Character' type_name = 'Character'
@ -13,19 +12,6 @@ class InvalidMeta:
other_value = True other_value = True
def test_field_added_in_meta():
opt = Options(Meta)
class ObjectType(object):
pass
opt.contribute_to_class(ObjectType, '_meta')
f = Field(None)
f.attname = 'string_field'
opt.add_field(f)
assert f in opt.fields
def test_options_contribute(): def test_options_contribute():
opt = Options(Meta) opt = Options(Meta)