def test_normalise_phone_number_raises_if_unparseable_characters(phone_number):
    assert normalise_phone_number(phone_number) is False
Exemplo n.º 2
0
def test_normalise_phone_number_raises_if_unparseable_characters(phone_number):
    with pytest.raises(InvalidPhoneError):
        normalise_phone_number(phone_number)
Exemplo n.º 3
0
 def valid_phone_number(self, num):
     try:
         normalise_phone_number(num.data)
         return True
     except InvalidPhoneError:
         raise ValidationError('Must be a valid phone number')