Ejemplo n.º 1
0
def test_field_resolve_type_custom():
    class MyCustomType(ObjectType):
        pass

    f = Field('MyCustomType')

    class OtherType(ObjectType):
        field_name = f

    s = Schema()
    s.query = OtherType
    s.register(MyCustomType)

    assert s.T(f).type == s.T(MyCustomType)
Ejemplo n.º 2
0
def test_field_resolve_type_custom():
    class MyCustomType(ObjectType):
        pass

    f = Field('MyCustomType')

    class OtherType(ObjectType):
        field_name = f

    s = Schema()
    s.query = OtherType
    s.register(MyCustomType)

    assert s.T(f).type == s.T(MyCustomType)