mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-11 12:16:58 +03:00
Failing test of interface implementation registration.
This commit is contained in:
parent
8bc14953d7
commit
aa2f4c5bac
|
@ -132,6 +132,21 @@ def test_schema_register():
|
|||
assert schema.get_type('MyType') == MyType
|
||||
|
||||
|
||||
def test_schema_register_interfaces():
|
||||
class Query(ObjectType):
|
||||
f = Field(Character)
|
||||
|
||||
def resolve_f(self, args, info):
|
||||
return Human()
|
||||
|
||||
schema = Schema(query=Query)
|
||||
|
||||
schema.register(Human)
|
||||
|
||||
result = schema.execute('{ f { name } }')
|
||||
assert not result.errors
|
||||
|
||||
|
||||
def test_schema_register_no_query_type():
|
||||
schema = Schema(name='My own schema')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user