You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
884 B

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