class TestBooleanTypeRequired(TestTypes, unittest.TestCase): schema = jsd.Boolean(required=True).json() expected_schema = {'type': 'boolean'} valid_input = [True, False] invalid_input = ['s', 1, None]
class Example(jsd.Object): thing = jsd.OneOf(jsd.String(), jsd.Boolean(required=True))
class TestBooleanType(TestTypes, unittest.TestCase): schema = jsd.Boolean().json() expected_schema = {'type': ['boolean', 'null']} valid_input = [True, False, None] invalid_input = ['s', 1]