def test_non_sms_character_validation(data, err_msg, client): with pytest.raises(ValidationError) as error: OnlySMSCharacters()(None, _gen_mock_field(data)) assert str(error.value) == err_msg
def test_sms_character_validation(client, msg): OnlySMSCharacters(template_type='sms')(None, _gen_mock_field(msg))
def test_sms_character_validation(client, msg): OnlySMSCharacters()(None, _gen_mock_field(msg))
def validate_template_content(self, field): OnlySMSCharacters()(None, field)