示例#1
0
 def test_pay(self):
     purchase_item = self.create_purchase_order_item()
     adapt = PurchaseOrderAdaptToPaymentTransaction(
         purchase=purchase_item.order)
     payment = adapt.pay()
     self.assertEquals(payment, None)
     self.create_payment(group=adapt.purchase.group)
     with self.assertRaises(ValueError):
         adapt.pay()
示例#2
0
 def test_create_commission(self):
     purchase = self.create_purchase_order()
     adapt = PurchaseOrderAdaptToPaymentTransaction(purchase=purchase)
     payment = self.create_payment(group=purchase.group)
     result = adapt.create_commission(payment=payment)
     self.assertEquals(result, None)
示例#3
0
 def test_return_(self):
     purchase = self.create_purchase_order()
     adapt = PurchaseOrderAdaptToPaymentTransaction(purchase=purchase)
     self.assertEquals(adapt.return_(renegotiation=None), None)