def test_is_valid(self):
        validator = Validator()
        validator.validate = self.mock().MagicMock(return_value=True)

        self.assertTrue(validator.is_valid('foo'))

        validator.validate = self.mock().MagicMock(return_value=False)

        self.assertTrue(validator.is_valid('foo'))
Validator.is_valid() should return True if validate() passes False otherwise
dataset/ETHPy150Open sdispater/cleo/tests/validators/test_validators.py/ValidatorTestCase.test_is_valid