def _check(fst_name, sec_name): """ Tests evolution from schema named MyRecord.{fst_name}.avsc to schema named MyRecord.{sec_name}.avsc in BASE_DIR """ fst = schema.parse(open("%s/MyRecord.%s.avsc" % (BASE_DIR, fst_name)).read()) sec = schema.parse(open("%s/MyRecord.%s.avsc" % (BASE_DIR, sec_name)).read()) try: validator.check([fst, sec]) except: "good"
def test_allowed_operations(): fst = schema.parse(open("%s/MyRecord.base.avsc" % BASE_DIR).read()) sec = schema.parse(open("%s/MyRecord.good.avsc" % BASE_DIR).read()) validator.check([fst, sec])