本文整理汇总了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)
示例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])
示例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'])
示例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)
示例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')
示例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])
示例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)
示例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)