def test_balance_first_doc_order(self): initial = float(100) balance_amounts = [(p._id, initial) for p in self.products] transfers = [(p._id, float(50 - 10*i)) for i, p in enumerate(self.products)] self.submit_xml_form(balance_first(balance_amounts, transfers)) for product, amt in transfers: self.check_product_stock(self.sp, product, initial + amt, amt)
def test_balance_first_doc_order(self): initial = float(100) balance_amounts = [(p._id, initial) for p in self.products] transfers = [(p._id, float(50 - 10*i)) for i, p in enumerate(self.products)] self.submit_xml_form(balance_first(balance_amounts, transfers)) for product, amt in transfers: self.check_product_stock(self.sp, product, initial + amt, amt)