Пример #1
0
    def test_tries(self):
        not_valid = (-1, 0, 2, 11)
        with self.assertRaises(ValidationError):
            for t in not_valid:
                Validator.tries(t)

        for t in range(3, 11):
            self.assertIsNone(Validator.tries(t))
Пример #2
0
 def test_tries(self):
     not_valid = (0, -1, 15)
     for tries in not_valid:
         with self.assertRaises(ValidationError):
             Validator.tries(tries)