本文整理汇总了Python中versions.models.Version.all_files方法的典型用法代码示例。如果您正苦于以下问题:Python Version.all_files方法的具体用法?Python Version.all_files怎么用?Python Version.all_files使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类versions.models.Version
的用法示例。
在下文中一共展示了Version.all_files方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_version_status
# 需要导入模块: from versions.models import Version [as 别名]
# 或者: from versions.models.Version import all_files [as 别名]
def test_version_status():
addon = Addon()
version = Version()
version.all_files = [File(status=amo.STATUS_PUBLIC), File(status=amo.STATUS_UNREVIEWED)]
eq_(u"Fully Reviewed,Awaiting Review", helpers.version_status(addon, version))
version.all_files = [File(status=amo.STATUS_UNREVIEWED)]
eq_(u"Awaiting Review", helpers.version_status(addon, version))
示例2: test_version_status
# 需要导入模块: from versions.models import Version [as 别名]
# 或者: from versions.models.Version import all_files [as 别名]
def test_version_status():
addon = Addon()
version = Version()
version.all_files = [File(status=amo.STATUS_PUBLIC),
File(status=amo.STATUS_DELETED)]
eq_(u'Fully Reviewed,Deleted', helpers.version_status(addon, version))
version.all_files = [File(status=amo.STATUS_UNREVIEWED)]
eq_(u'Awaiting Preliminary Review', helpers.version_status(addon, version))
示例3: test_version_status
# 需要导入模块: from versions.models import Version [as 别名]
# 或者: from versions.models.Version import all_files [as 别名]
def test_version_status():
addon = Addon()
version = Version()
version.all_files = [File(status=amo.STATUS_PUBLIC), File(status=amo.STATUS_DELETED)]
eq_(u"Fully Reviewed,Deleted", helpers.version_status(addon, version))
version.all_files = [File(status=amo.STATUS_UNREVIEWED)]
eq_(u"Awaiting Preliminary Review", helpers.version_status(addon, version))
with patch.object(settings, "MARKETPLACE", True):
version.all_files = [File(status=amo.STATUS_PENDING)]
eq_(u"Pending approval", helpers.version_status(addon, version))
version.deleted = True
eq_(u"Deleted", helpers.version_status(addon, version))
示例4: test_version_status
# 需要导入模块: from versions.models import Version [as 别名]
# 或者: from versions.models.Version import all_files [as 别名]
def test_version_status():
addon = Addon()
version = Version()
version.all_files = [File(status=amo.STATUS_PUBLIC),
File(status=amo.STATUS_DELETED)]
eq_(u'Published,Deleted', helpers.version_status(addon, version))
version.all_files = [File(status=amo.STATUS_UNREVIEWED)]
eq_(u'Awaiting Preliminary Review', helpers.version_status(addon, version))
with patch.object(settings, 'MARKETPLACE', True):
version.all_files = [File(status=amo.STATUS_PENDING)]
eq_(u'Pending approval', helpers.version_status(addon, version))
version.deleted = True
eq_(u'Deleted', helpers.version_status(addon, version))
示例5: _get_version
# 需要导入模块: from versions.models import Version [as 别名]
# 或者: from versions.models.Version import all_files [as 别名]
def _get_version(self, status):
v = Version()
v.all_files = [mock.Mock()]
v.all_files[0].status = status
return v