Skip to content

Commit aa2f4c5

Browse files
committed
Failing test of interface implementation registration.
1 parent 8bc1495 commit aa2f4c5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

graphene/core/tests/test_schema.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,21 @@ class MyType(ObjectType):
132132
assert schema.get_type('MyType') == MyType
133133

134134

135+
def test_schema_register_interfaces():
136+
class Query(ObjectType):
137+
f = Field(Character)
138+
139+
def resolve_f(self, args, info):
140+
return Human()
141+
142+
schema = Schema(query=Query)
143+
144+
schema.register(Human)
145+
146+
result = schema.execute('{ f { name } }')
147+
assert not result.errors
148+
149+
135150
def test_schema_register_no_query_type():
136151
schema = Schema(name='My own schema')
137152

0 commit comments

Comments
 (0)