partner-contact/partner_phone_secondary/tests/test_partner_phone_secondary.py
2021-03-23 20:13:18 +01:00

20 lines
887 B
Python

# Copyright 2020 - Iván Todorovich
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from flectra.tests.common import Form, TransactionCase
class TestPartnerPhoneSecondary(TransactionCase):
def test_01_phone_validation_compatibility(self):
# This is here only to get code coverage.
with Form(self.env["res.partner"]) as form:
form.name = "French Partner"
form.country_id = self.env.ref("base.fr")
form.phone = "766666666"
form.phone2 = "766666666"
# It's not the purpose of this module to test phone_validation,
# nor how it formats phone numbers. Also it's not directly depended
# by this module. We do know for sure, though, that the same number
# is going to be formatted in the exact same way.
self.assertEqual(form.phone, form.phone2)