当前位置: 首页>>代码示例>>Python>>正文


Python Version.all_files方法代码示例

本文整理汇总了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))
开发者ID:aniketkudale,项目名称:olympia,代码行数:10,代码来源:test_helpers.py

示例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))
开发者ID:aditbiswas1,项目名称:olympia,代码行数:11,代码来源:test_helpers.py

示例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))
开发者ID:nearlyfreeapps,项目名称:zamboni,代码行数:17,代码来源:test_helpers.py

示例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))
开发者ID:chusiang,项目名称:zamboni,代码行数:18,代码来源:test_helpers.py

示例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
开发者ID:Sancus,项目名称:zamboni,代码行数:7,代码来源:tests.py


注:本文中的versions.models.Version.all_files方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。