def test_boolean_validator(self):
        validate = validator.BoolValidator

        self.assertEqual(validate(True).value, True)
        self.assertEqual(validate(1).value, True)
        self.assertEqual(validate('true').value, True)
        self.assertEqual(validate('on').value, True)
        self.assertEqual(validate('yes').value, True)

        self.assertEqual(validate('test').value, False)
        self.assertEqual(validate(False).value, False)
        self.assertEqual(validate(0).value, False)
        self.assertEqual(validate('false').value, False)
        self.assertEqual(validate('off').value, False)
        self.assertEqual(validate('no').value, False)
Test Boolean validator conversion type
dataset/ETHPy150Open Net-ng/kansha/tests/test_validators.py/ValidatorTest.test_boolean_validator