def test_extensive_search(self):
    number = PhoneNumber.objects.create(domain=self.domain, owner_doc_type='X', owner_id='X', phone_number='999123', verified=True, pending_verification=False, is_two_way=True)
    self.assertEqual(PhoneNumber.by_extensive_search('999123'), number)
    self.assertEqual(PhoneNumber.by_extensive_search('0999123'), number)
    self.assertEqual(PhoneNumber.by_extensive_search('00999123'), number)
    self.assertEqual(PhoneNumber.by_extensive_search('000999123'), number)
    self.assertEqual(PhoneNumber.by_extensive_search('123'), number)
    self.assertIsNone(PhoneNumber.by_extensive_search('999124'))
def test_extensive_search(self):
    number = PhoneNumber.objects.create(domain=self.domain, owner_doc_type='X', owner_id='X', phone_number='999123', verified=True, pending_verification=False, is_two_way=True)
    self.assertEqual(PhoneNumber.by_extensive_search('999123'), number)
    self.assertEqual(PhoneNumber.by_extensive_search('0999123'), number)
    self.assertEqual(PhoneNumber.by_extensive_search('00999123'), number)
    self.assertEqual(PhoneNumber.by_extensive_search('000999123'), number)
    self.assertEqual(PhoneNumber.by_extensive_search('123'), number)
    self.assertIsNone(PhoneNumber.by_extensive_search('999124'))