From b51723d288d0c9fb02f6cc66d4311de71ebf43a7 Mon Sep 17 00:00:00 2001 From: darshan-serpent Date: Thu, 16 Mar 2017 13:47:17 +0530 Subject: [PATCH] [IMP] test coverage --- .../tests/test_stock_inventory_revaluation.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stock_inventory_revaluation/tests/test_stock_inventory_revaluation.py b/stock_inventory_revaluation/tests/test_stock_inventory_revaluation.py index 167cdf009..1a976d88f 100644 --- a/stock_inventory_revaluation/tests/test_stock_inventory_revaluation.py +++ b/stock_inventory_revaluation/tests/test_stock_inventory_revaluation.py @@ -6,6 +6,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from openerp.tests.common import TransactionCase +from openerp import exceptions from datetime import datetime from datetime import date, timedelta @@ -295,6 +296,12 @@ class TestStockInventoryRevaluation(TransactionCase): invent_value_change.account_move_ids[0].line_ids), 2, 'Incorrect accounting entry generated') + with self.assertRaises(exceptions.Warning): + invent_value_change.account_move_ids.unlink() + + with self.assertRaises(exceptions.Warning): + invent_value_change.account_move_ids[0].line_ids.unlink() + for move_line in invent_value_change.account_move_ids[0].line_ids: if move_line.account_id == self.account_inventory: self.assertEqual(move_line.credit, 50.0,