def test_with_data_missing(self): """ WHEN we pass in None THEN we get a ValueError """ with pytest.raises(ValueError): a_field = validate_required(None) # NOQA
def test_with_data(self): """ WHEN we pass in a value THEN we get back True """ a_field = validate_required('foo') assert a_field
def tag(self, tag): if validate_required(tag): self.__tag = tag