本文整理汇总了Python中addons.models.Addon.suggested_amount方法的典型用法代码示例。如果您正苦于以下问题:Python Addon.suggested_amount方法的具体用法?Python Addon.suggested_amount怎么用?Python Addon.suggested_amount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类addons.models.Addon
的用法示例。
在下文中一共展示了Addon.suggested_amount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_support_addon
# 需要导入模块: from addons.models import Addon [as 别名]
# 或者: from addons.models.Addon import suggested_amount [as 别名]
def test_support_addon(self):
a = Addon(id=12)
eq_(support_addon(a), "")
# TODO(jbalogh): check the url when using reverse
a.wants_contributions = a.paypal_id = True
eq_(PyQuery(support_addon(a))("a").text(), "Support this add-on")
a.suggested_amount = "12"
doc = PyQuery(support_addon(a))
eq_(doc(".contribute").text(), "Support this add-on: Contribute $12.00")
示例2: test_support_addon
# 需要导入模块: from addons.models import Addon [as 别名]
# 或者: from addons.models.Addon import suggested_amount [as 别名]
def test_support_addon(self):
a = Addon(id=12)
eq_(support_addon(a), '')
# TODO(jbalogh): check the url when using reverse
a.wants_contributions = a.paypal_id = True
eq_(PyQuery(support_addon(a))('a').text(), 'Support this add-on')
a.suggested_amount = '12'
doc = PyQuery(support_addon(a))
eq_(doc('.contribute').text(),
'Support this add-on: Contribute $12.00')
示例3: test_support_addon
# 需要导入模块: from addons.models import Addon [as 别名]
# 或者: from addons.models.Addon import suggested_amount [as 别名]
def test_support_addon(self):
a = Addon(id=12, type=1)
eq_(support_addon(a), '')
a.wants_contributions = a.paypal_id = True
a.status = amo.STATUS_PUBLIC
eq_(PyQuery(support_addon(a))('a').text(), 'Support this add-on')
a.suggested_amount = '12'
doc = PyQuery(support_addon(a))
eq_(doc('.contribute').text(),
'Support this add-on: Contribute $12.00')