tests.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:django-paydirekt 作者: ParticulateSolutions 项目源码 文件源码
def test_full_valid_direct_sale_checkout_full_with_notification(self):
        paydirekt_checkout = self._create_direct_sale()
        self.assertEqual(paydirekt_checkout.status, 'OPEN')
        self.assertEqual(paydirekt_checkout.total_amount, 100)
        test_customer = TestCustomer()
        test_customer.confirm_checkout(paydirekt_checkout)

        # give paydirekt time to approve
        time.sleep(10)

        client = Client()
        post_data = {'checkoutId': paydirekt_checkout.checkout_id, 'merchantOrderReferenceNumber': '', 'checkoutStatus': 'APPROVED'}
        client.post('/paydirekt/notify/', data=json.dumps(post_data), content_type='application/hal+json')
        paydirekt_checkout.refresh_from_db()
        self.assertEqual(paydirekt_checkout.status, 'APPROVED')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号