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