本文整理汇总了Python中mkt.lookup.views._transaction_summary函数的典型用法代码示例。如果您正苦于以下问题:Python _transaction_summary函数的具体用法?Python _transaction_summary怎么用?Python _transaction_summary使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_transaction_summary函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_is_refundable
def test_is_refundable(self, solitude):
solitude.api.bango.refund.status.get.return_value = {'status': PENDING}
self.contrib.update(type=amo.CONTRIB_PURCHASE)
data = _transaction_summary(self.uuid)
eq_(data['contrib'].pk, self.contrib.pk)
eq_(data['is_refundable'], True)
self.create_test_refund()
data = _transaction_summary(self.uuid)
eq_(data['is_refundable'], False)
开发者ID:JaredKerim-Mozilla,项目名称:zamboni,代码行数:11,代码来源:test_views.py
示例2: test_refund_status
def test_refund_status(self, solitude):
solitude.api.bango.refund.status.get.return_value = {'status': PENDING}
self.create_test_refund()
data = _transaction_summary(self.uuid)
eq_(data['refund_status'], SOLITUDE_REFUND_STATUSES[PENDING])
开发者ID:JaredKerim-Mozilla,项目名称:zamboni,代码行数:7,代码来源:test_views.py
示例3: test_bango_transaction_status
def test_bango_transaction_status(self, solitude):
solitude.api.generic.transaction.get_object_or_404.return_value = (
{'uid_support': 'foo', 'provider': 1,
'seller': '/generic/seller/1/'})
self.create_test_refund()
data = _transaction_summary(self.uuid)
ok_(data['package_id'])
开发者ID:jamesthechamp,项目名称:zamboni,代码行数:8,代码来源:test_views.py
示例4: test_transaction_fails
def test_transaction_fails(self, solitude):
solitude.api.generic.transaction.get_object_or_404.side_effect = (
ObjectDoesNotExist)
self.create_test_refund()
data = _transaction_summary(self.uuid)
eq_(data['support'], None)
eq_(data['lookup']['transaction'], False)
开发者ID:jamesthechamp,项目名称:zamboni,代码行数:9,代码来源:test_views.py
示例5: test_transaction_status
def test_transaction_status(self, solitude):
solitude.api.generic.transaction.get_object_or_404.return_value = (
{'uid_support': 'foo', 'provider': 2})
self.create_test_refund()
data = _transaction_summary(self.uuid)
eq_(data['support'], 'foo')
eq_(data['provider'], 'reference')
开发者ID:jamesthechamp,项目名称:zamboni,代码行数:9,代码来源:test_views.py
示例6: test_refund_status
def test_refund_status(self, solitude):
solitude.api.bango.refund.get_object_or_404.return_value = (
{'status': PENDING})
solitude.api.generic.transaction.get_object_or_404.return_value = (
{'uid_support': 'foo', 'provider': 2})
self.create_test_refund()
data = _transaction_summary(self.uuid)
eq_(data['support'], 'foo')
eq_(data['refund_status'], SOLITUDE_REFUND_STATUSES[PENDING])
开发者ID:jamesthechamp,项目名称:zamboni,代码行数:11,代码来源:test_views.py
示例7: test_transaction_summary
def test_transaction_summary(self):
data = _transaction_summary(self.uuid)
eq_(data['is_refundable'], False)
eq_(data['contrib'].pk, self.contrib.pk)
开发者ID:JaredKerim-Mozilla,项目名称:zamboni,代码行数:5,代码来源:test_views.py
示例8: test_is_refundable
def test_is_refundable(self, solitude):
self.contrib.update(type=amo.CONTRIB_PURCHASE)
data = _transaction_summary(self.uuid)
eq_(data['contrib'].pk, self.contrib.pk)
eq_(data['is_refundable'], True)
开发者ID:fwenzel,项目名称:zamboni,代码行数:5,代码来源:test_views.py
注:本文中的mkt.lookup.views._transaction_summary函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论