From 81bd4d8e855ac7167145baa8718d2c9d543578ea Mon Sep 17 00:00:00 2001 From: darshan-serpent Date: Mon, 7 Nov 2016 11:07:12 +0530 Subject: [PATCH] tested computation for product availability. --- .../tests/test_stock_warehouse_orderpoint.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stock_warehouse_orderpoint_stock_info/tests/test_stock_warehouse_orderpoint.py b/stock_warehouse_orderpoint_stock_info/tests/test_stock_warehouse_orderpoint.py index e3de847e6..de483d221 100644 --- a/stock_warehouse_orderpoint_stock_info/tests/test_stock_warehouse_orderpoint.py +++ b/stock_warehouse_orderpoint_stock_info/tests/test_stock_warehouse_orderpoint.py @@ -75,6 +75,10 @@ class TestStockWarehouseOrderpoint(common.TransactionCase): def test_product_qty(self): 'Tests the product quantity in the Reordering rules' + # Checks the product availability + self.reordering_record._product_available() + self.assertFalse(self.reordering_record.available) + # Create & process moves to test the product quantity self.move = self.create_stock_move() self.reordering_record._product_available_qty() self.assertEqual(self.reordering_record.incoming_location_qty, @@ -91,3 +95,6 @@ class TestStockWarehouseOrderpoint(common.TransactionCase): self.assertEqual(self.reordering_record.virtual_location_qty, self.product.virtual_available, 'Virtual Qty does not match') + # Checks the product availability after moves processed + self.reordering_record._product_available() + self.assertTrue(self.reordering_record.available)