From ab17e27abba2cd387ff3246dbe0f76cf5e481e76 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 15 Jun 2016 11:16:13 +0200 Subject: [PATCH] Ensure context is set when testing lot quantity Since changeset 3a17f8e704a7, there is no more context leak so the context when computing quantities is exactly the one at the instantiation. review25231002 --- tests/test_stock_lot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_stock_lot.py b/tests/test_stock_lot.py index 78f466a06a..a23c0d7329 100644 --- a/tests/test_stock_lot.py +++ b/tests/test_stock_lot.py @@ -112,6 +112,7 @@ class StockLotTestCase(ModuleTestCase): (storage.id, product.id, None): 3, }) with Transaction().set_context(locations=[storage.id]): + lot1, lot2 = Lot.browse([lot1, lot2]) self.assertEqual(lot1.quantity, 5) self.assertEqual(lot2.quantity, 8)