Ejemplo n.º 1
0
 def test_valid_phone(self):
     valid_numbers = ('12223334444', '112223334444', '1112223334444')
     for number in valid_numbers:
         self.assertEqual(None, validate_phone(number))
Ejemplo n.º 2
0
 def clean_mobile_number(self):
     mobile_number = normalize_number(self.cleaned_data['mobile_number'])
     validate_phone(mobile_number)
     return mobile_number
Ejemplo n.º 3
0
 def test_valid_phone(self):
     valid_numbers = ('12223334444', '112223334444', '1112223334444')
     for number in valid_numbers:
         self.assertEqual(None, validate_phone(number))       
Ejemplo n.º 4
0
 def clean_mobile_number(self):
     mobile_number = normalize_number(self.cleaned_data['mobile_number'])
     validate_phone(mobile_number)
     return mobile_number