Odoo18-Base/addons/phone_validation/tests/test_phonenumbers_blacklist.py
2025-03-10 11:12:23 +07:00

15 lines
523 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests.common import TransactionCase
class TestPhonenumbersBlacklist(TransactionCase):
def test_sanitize_search(self):
""" Test that when using search, the number is sanitized """
blacklist = self.env['phone.blacklist']
blacklist.create({'number': '+917589632587'})
res = blacklist.search([('number', 'in', ['+917 5896 32587'])])
self.assertEqual(len(res), 1, "There should be one result")