mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-25 19:13:57 +03:00
Fixed options tests
This commit is contained in:
parent
f5837ac4f3
commit
b417a65f19
|
@ -1,11 +1,10 @@
|
|||
from py.test import raises
|
||||
|
||||
from graphene.core.fields import Field
|
||||
from graphene.core.options import Options
|
||||
from graphene.core.classtypes import Options
|
||||
|
||||
|
||||
class Meta:
|
||||
is_interface = True
|
||||
type_name = 'Character'
|
||||
|
||||
|
||||
|
@ -13,19 +12,6 @@ class InvalidMeta:
|
|||
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():
|
||||
opt = Options(Meta)
|
||||
|
Loading…
Reference in New Issue
Block a user