[FIX] stock: correct wizard test

Accessing one2many items by their index seems to produce issue regarding the order. This commit fix the potential issue in the test by summing the two quant quantity instead of comparing them one by one.

closes odoo/odoo#27627
This commit is contained in:
William Henrotin
2018-10-10 08:27:28 +00:00
parent c76734655e
commit 70091972b2
+1 -2
View File
@@ -251,5 +251,4 @@ class TestPacking(TransactionCase):
self.assertEqual(pack1.location_id.id, shelf1_location.id, 'The package must be stored in shelf1')
qp1 = pack2.quant_ids[0]
qp2 = pack2.quant_ids[1]
self.assertEqual(qp1.quantity, 5, 'The quant has not the good quantity')
self.assertEqual(qp2.quantity, 7, 'The quant has not the good quantity')
self.assertEqual(qp1.quantity + qp2.quantity, 12, 'The quant has not the good quantity')