Пример #1
0
 def returns_false_for_random_garbage():
     assert is_type({"what": "is this"}) is False
     with raises(TypeError):
         assert_type({"what": "is this"})
Пример #2
0
 def returns_false_for_type_classes_rather_than_instance():
     assert is_type(GraphQLObjectType) is False
     with raises(TypeError):
         assert_type(GraphQLObjectType)
Пример #3
0
 def returns_true_for_unwrapped_types():
     assert is_type(GraphQLString) is True
     assert_type(GraphQLString)
     assert is_type(ObjectType) is True
     assert_type(ObjectType)
Пример #4
0
 def returns_true_for_wrapped_types():
     assert is_type(GraphQLNonNull(GraphQLString)) is True
     assert_type(GraphQLNonNull(GraphQLString))
Пример #5
0
 def returns_false_for_random_garbage():
     assert is_type({'what': 'is this'}) is False
     with raises(TypeError):
         assert_type({'what': 'is this'})