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, }) - )