def test_get_annotation_typestr_type_module(self): custom_type = type('CustomType', tuple(), {}) custom_type.__module__ = 'a.b.c' field = Field(key='helo') field.storage_type = custom_type assert get_annotation_typestr(field) == 'a.b.c.CustomType'
def test_get_annotation_type_any(self): field = Field(key='hello') field.storage_type = '' assert get_annotation_typestr(field) == 'typing.Any'
def test_get_annotation_typestr_str(self): field = Field(key='hello') field.storage_type = 'asdf' assert get_annotation_typestr(field) == 'asdf'