def test_objects_with_same_number_are_equal(self):
     numbers = [
         MandatoryPhoneNumber.objects.create(
             phone_number=number_string).phone_number
         for number_string in self.equal_number_strings]
     self.assertTrue(all(is_number_match(n, numbers[0]) == MatchType.EXACT_MATCH
                     for n in numbers))
Пример #2
0
 def test_objects_with_same_number_are_equal(self):
     numbers = [
         MandatoryPhoneNumber.objects.create(
             phone_number=number_string).phone_number
         for number_string in self.equal_number_strings
     ]
     self.assertTrue(
         all(
             phonenumbers.is_number_match(n, numbers[0]) ==
             phonenumbers.MatchType.EXACT_MATCH for n in numbers))