def returns_false_for_non_leaf_type(): assert is_leaf_type(ObjectType) is False with raises(TypeError): assert_leaf_type(ObjectType)
def returns_false_for_wrapped_non_leaf_type(): assert is_leaf_type(GraphQLList(ObjectType)) is False with raises(TypeError): assert_leaf_type(GraphQLList(ObjectType))
def returns_true_for_scalar_and_enum_types(): assert is_leaf_type(ScalarType) is True assert_leaf_type(ScalarType) assert is_leaf_type(EnumType) is True assert_leaf_type(EnumType)