mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] test coverage
This commit is contained in:
committed by
Jordi Ballester Alomar
parent
99be7775e7
commit
b51723d288
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user