def test_no_plus(self): with pytest.raises(ValidationError): validate_starts_with_plus('nope')
def test_plus(self): validate_starts_with_plus('+44') validate_starts_with_plus('+1') validate_starts_with_plus('+test') validate_starts_with_plus('+yup')