本文整理汇总了Python中addons.models.Addon.is_unreviewed方法的典型用法代码示例。如果您正苦于以下问题:Python Addon.is_unreviewed方法的具体用法?Python Addon.is_unreviewed怎么用?Python Addon.is_unreviewed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类addons.models.Addon
的用法示例。
在下文中一共展示了Addon.is_unreviewed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_is_unreviewed
# 需要导入模块: from addons.models import Addon [as 别名]
# 或者: from addons.models.Addon import is_unreviewed [as 别名]
def test_is_unreviewed(self):
"""Test if add-on is unreviewed or not"""
# public add-on
a = Addon.objects.get(pk=3615)
assert not a.is_unreviewed(), 'public add-on: is_unreviewed=False'
# unreviewed add-on
a = Addon(status=amo.STATUS_UNREVIEWED)
assert a.is_unreviewed(), 'sandboxed add-on: is_unreviewed=True'
a.status = amo.STATUS_PENDING
assert a.is_unreviewed(), 'pending add-on: is_unreviewed=True'
示例2: test_is_unreviewed
# 需要导入模块: from addons.models import Addon [as 别名]
# 或者: from addons.models.Addon import is_unreviewed [as 别名]
def test_is_unreviewed(self):
"""Test if add-on is experimental or not"""
# public add-on
a = Addon.objects.get(pk=3615)
assert not a.is_unreviewed(), 'public add-on: is_unreviewed=False'
# experimental add-on
a = Addon(status=amo.STATUS_SANDBOX)
assert a.is_unreviewed(), 'sandboxed add-on: is_unreviewed=True'