Пример #1
0
 def test_validator_raises_validation_error_if_given_format_is_not_valid(
         self, value):
     validator = validators.MinCronValueValidator(limit_value=1)
     with self.assertRaises(ValidationError):
         validator(value)
Пример #2
0
 def test_validator_does_not_raise_error_if_schedule_is_greater_than_or_equal_1_hour(
         self, value):
     validator = validators.MinCronValueValidator(limit_value=1)
     validator(value)
Пример #3
0
 def test_validator_raises_validation_error_if_given_schedule_value_is_less_than_1_hours(
         self, value):
     validator = validators.MinCronValueValidator(limit_value=1)
     with self.assertRaises(ValidationError):
         validator(value)