From da45e8d0a0bf0906814fd592b89146dc96367510 Mon Sep 17 00:00:00 2001 From: Jos De Graeve Date: Thu, 4 Jun 2015 17:35:06 +0200 Subject: [PATCH] Fix test case Tip cortesy of Nicolas Schmitt --- pos_require_customer/tests/test_pos.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pos_require_customer/tests/test_pos.py b/pos_require_customer/tests/test_pos.py index bb544a25..f5872e56 100644 --- a/pos_require_customer/tests/test_pos.py +++ b/pos_require_customer/tests/test_pos.py @@ -31,10 +31,8 @@ class TestPosRequireCustomer(common.TransactionCase): pos_session = self.env['pos.session'].create( {'config_id': posconfig.id}) # should raise exceptions.ValidationError - self.assertRaises( - exceptions.ValidationError, + with self.assertRaises(exceptions.ValidationError): self.env['pos.order'].create({ 'session_id': pos_session.id, 'partner_id': False, }) - )