def test_should_onetoone_convert_field():
class A(PynamoObjectType):
class Meta:
model = Article
interfaces = (Node,)
dynamic_field = convert_pynamo_attribute(Reporter.favorite_article, Reporter.favorite_article, A._meta.registry)
assert isinstance(dynamic_field, Dynamic)
graphene_type = dynamic_field.get_type()
assert isinstance(graphene_type, graphene.Field)
assert graphene_type.type == A
评论列表
文章目录