def test_good_data(self): try: schema = validictory.load_extends(self.schema2, self.schemas) validictory.validate({"foo": 1}, schema) except ValueError, e: self.fail("Unexpected failure: %s" % e)
def test_bad_data(self): with self.assertRaises(ValueError): schema = validictory.load_extends(self.schema2, self.schemas) logging.debug(schema) validictory.validate({}, schema)