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()
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)
def test_return_(self): purchase = self.create_purchase_order() adapt = PurchaseOrderAdaptToPaymentTransaction(purchase=purchase) self.assertEquals(adapt.return_(renegotiation=None), None)