Exemplo n.º 1
0
def test_stringfield_type_required():
    f = StringField(required=True)
    f.contribute_to_class(ot, 'field_name')
    assert isinstance(f.internal_field(schema), GraphQLField)
    assert isinstance(f.internal_type(schema), GraphQLNonNull)
Exemplo n.º 2
0
def test_stringfield_type():
    f = StringField()
    f.contribute_to_class(ot, 'field_name')
    assert f.internal_type(schema) == GraphQLString