From d623c091f3b4a6ae436154abf4fb6ac709879dd0 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 8 Nov 2013 23:15:35 +0100 Subject: [PATCH] [IMP] stock: do not use assert in (python) tests bzr revid: chs@openerp.com-20131108221535-c0lowzwd15d7asd3 --- addons/stock/tests/test_multicompany.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/stock/tests/test_multicompany.py b/addons/stock/tests/test_multicompany.py index fb840a846ea..f0175791b50 100644 --- a/addons/stock/tests/test_multicompany.py +++ b/addons/stock/tests/test_multicompany.py @@ -56,7 +56,7 @@ class TestStockMulticompany(common.TransactionCase): try: self.stock_location.check_access_rule(cr, uid, [defaults[field]], 'read', context) except Exception, exc: - assert False, "unreadable location %s: %s" % (field, exc) + self.fail("unreadable location %s: %s" % (field, exc)) self.assertEqual(defaults['type'], type, "wrong move type") @@ -71,7 +71,7 @@ class TestStockMulticompany(common.TransactionCase): try: self.stock_location.check_access_rule(cr, uid, [result[field]], 'read', context) except Exception, exc: - assert False, "unreadable location %s: %s" % (field, exc) + self.fail("unreadable location %s: %s" % (field, exc)) def test_20_multicompany_default_stock_fill_inventory(self): @@ -82,7 +82,7 @@ class TestStockMulticompany(common.TransactionCase): try: self.stock_location.check_access_rule(cr, uid, [defaults['location_id']], 'read', context) except Exception, exc: - assert False, "unreadable source location: %s" % exc + self.fail("unreadable source location: %s" % exc) def test_30_multicompany_default_warehouse_location(self): @@ -95,4 +95,4 @@ class TestStockMulticompany(common.TransactionCase): try: self.stock_location.check_access_rule(cr, uid, [defaults[field]], 'read', context) except Exception, exc: - assert False, "unreadable default %s: %s" % (field, exc) + self.fail("unreadable default %s: %s" % (field, exc))