def __init__(self, *args, **kwargs): super(TestMetaschemaProperty, self).__init__(*args, **kwargs) self._valid = [] self._invalid = [] self._encode_errors = [] self._valid_compare = [(0, 0)] self._invalid_compare = [(0, 1)] self._valid_normalize_schema = [] self.validator = get_validator()(get_metaschema())
def test_normalizer_iter_errors_js2(): r"""Test normalizer iter_errors_js2 method.""" cls = get_validator() s = {'type': 'array', 'items': [True]} x = cls(s) x.validate([True]) s = {'type': 'array', 'items': [False]} x = cls(s) assert_raises(jsonschema.exceptions.ValidationError, x.validate, [True])
def validator(cls): r"""JSON schema validator for the meta schema that includes added types.""" return get_validator()
def test_get_validator(): r"""Test get_validator.""" metaschema.get_validator()
def validator(self): r"""Schema validator.""" return get_validator()(get_metaschema())