예제 #1
0
 def returns_true_for_spec_defined_scalar():
     assert is_scalar_type(GraphQLString) is True
     assert_scalar_type(GraphQLString)
예제 #2
0
 def returns_true_for_custom_scalar():
     assert is_scalar_type(ScalarType) is True
     assert_scalar_type(ScalarType)
 def returns_false_for_non_object_type():
     assert is_scalar_type(InterfaceType) is False
     with raises(TypeError):
         assert_scalar_type(InterfaceType)
 def returns_false_for_wrapped_specified_scalar():
     assert is_scalar_type(GraphQLList(GraphQLString)) is False
 def returns_false_for_wrapped_scalar():
     assert is_scalar_type(GraphQLList(ScalarType)) is False
     with raises(TypeError):
         assert_scalar_type(GraphQLList(ScalarType))
 def returns_fals_for_scalar_class_rather_than_instance():
     assert is_scalar_type(GraphQLScalarType) is False
     with raises(TypeError):
         assert_scalar_type(GraphQLScalarType)
예제 #7
0
 def returns_false_for_non_scalar():
     assert is_scalar_type(EnumType) is False
     with raises(TypeError):
         assert_scalar_type(EnumType)