def test_validate_presence_invalid(self): self.model.color = None validations.validate_presence(self.model, "color") assert_bad_color(self.model)
def test_validate_presence_on_missing_attribute(self): self.model = ValidationModel() validations.validate_presence(self.model, "color") assert_bad_color(self.model)
def test_validate_presence_valid(self): validations.validate_presence(self.model, "color") assert_good_color(self.model)