def test_gsm_character_validation(client, msg): OnlyGSMCharacters()(None, _gen_mock_field(msg))
def test_non_gsm_character_validation(data, err_msg, client): with pytest.raises(ValidationError) as error: OnlyGSMCharacters()(None, _gen_mock_field(data)) assert str(error.value) == err_msg
def validate_template_content(self, field): OnlyGSMCharacters()(None, field)