mirror of
https://gitlab.com/flectra-community/bank-payment.git
synced 2024-12-25 13:51:44 +00:00
21 lines
631 B
Python
21 lines
631 B
Python
# © 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
|
|
|
|
from flectra.addons.base.tests.common import DISABLED_MAIL_CONTEXT
|
|
|
|
|
|
class TestBank(TransactionCase):
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
super().setUpClass()
|
|
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
|
|
|
|
def test_bank(self):
|
|
bank = self.env["res.bank"].search([], limit=1)
|
|
self.assertTrue(bank)
|
|
with self.assertRaises(ValidationError):
|
|
bank.bic = "TEST"
|