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
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user