bank-payment/account_payment_order/tests/test_bank.py

21 lines
631 B
Python
Raw Permalink Normal View History

2024-05-03 08:36:50 +00:00
# © 2017 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from flectra.exceptions import ValidationError
from flectra.tests.common import TransactionCase
2024-10-01 05:24:28 +00:00
from flectra.addons.base.tests.common import DISABLED_MAIL_CONTEXT
2024-05-03 08:36:50 +00:00
class TestBank(TransactionCase):
2024-10-01 05:24:28 +00:00
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
2024-05-03 08:36:50 +00:00
def test_bank(self):
bank = self.env["res.bank"].search([], limit=1)
self.assertTrue(bank)
with self.assertRaises(ValidationError):
bank.bic = "TEST"