From abad67be50b3ceee2574ca889f07b4e6f348cffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Villarreal=20Ortega?= Date: Tue, 13 Oct 2020 17:11:19 +0200 Subject: [PATCH] [13.0][FIX] stock_location_tray: Fix exceptions message in tests --- stock_location_tray/__manifest__.py | 2 +- stock_location_tray/tests/test_location.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stock_location_tray/__manifest__.py b/stock_location_tray/__manifest__.py index 15b26fee0..b2e714b97 100644 --- a/stock_location_tray/__manifest__.py +++ b/stock_location_tray/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Location Trays", "summary": "Organize a location as a matrix of cells", - "version": "13.0.1.0.1", + "version": "13.0.1.0.2", "category": "Stock", "author": "Camptocamp, Odoo Community Association (OCA)", "license": "AGPL-3", diff --git a/stock_location_tray/tests/test_location.py b/stock_location_tray/tests/test_location.py index d25fde098..bc087f243 100644 --- a/stock_location_tray/tests/test_location.py +++ b/stock_location_tray/tests/test_location.py @@ -135,9 +135,9 @@ class TestLocation(LocationTrayTypeCase): # we cannot archive an empty cell or any parent location = cell - message = "cannot be archived" + message = "You still have some product in locations" while location: - with self.assertRaisesRegex(exceptions.ValidationError, message): + with self.assertRaisesRegex(exceptions.UserError, message): location.active = False # restore state for the next test loop @@ -159,7 +159,7 @@ class TestLocation(LocationTrayTypeCase): self._cell_for(self.tray_location, x=1, y=1), self.product, 1 ) tray_type = self.tray_type_small_32x - message = "cannot be modified when they contain products" + message = "You still have some product in locations" with self.assertRaisesRegex(exceptions.UserError, message): self.tray_location.tray_type_id = tray_type