mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-18 03:52:24 +03:00
fix test
This commit is contained in:
parent
c37b9f85bb
commit
990c4c4e9d
|
@ -453,7 +453,7 @@ class Schema:
|
|||
return _type
|
||||
|
||||
def get_type(self, name):
|
||||
return self.graphql_schema.type_map.get(name).graphene_type
|
||||
return self.graphql_schema.type_map.get(name)
|
||||
|
||||
def lazy(self, _type):
|
||||
return lambda: self.get_type(_type)
|
||||
|
|
|
@ -32,7 +32,10 @@ def test_schema_get_type():
|
|||
schema = Schema(Query)
|
||||
assert schema.Query == Query
|
||||
assert schema.MyOtherType == MyOtherType
|
||||
assert schema.get_type("MyOtherType") == MyOtherType
|
||||
name = "MyOtherType"
|
||||
assert isinstance(schema.get_type(name), GraphQLObjectType)
|
||||
assert schema.get_type(name).name == name
|
||||
assert schema.get_type(name).graphene_type == MyOtherType
|
||||
|
||||
|
||||
def test_schema_get_type_error():
|
||||
|
|
Loading…
Reference in New Issue
Block a user