def test_transfer_source_only(self): initial = float(100) initial_amounts = [(p._id, initial) for p in self.products] self.submit_xml_form(balance_submission(initial_amounts)) deductions = [(p._id, float(50 - 10*i)) for i, p in enumerate(self.products)] self.submit_xml_form(transfer_source_only(deductions)) for product, amt in deductions: self.check_product_stock(self.sp, product, initial-amt, -amt)
def test_transfer_source_only(self): initial = float(100) initial_amounts = [(p._id, initial) for p in self.products] self.submit_xml_form(balance_submission(initial_amounts)) deductions = [(p._id, float(50 - 10*i)) for i, p in enumerate(self.products)] self.submit_xml_form(transfer_source_only(deductions)) for product, amt in deductions: self.check_product_stock(self.sp, product, initial-amt, -amt)