Esempio n. 1
0
    def test_convert_21_22(self):
        if os.path.exists(SERVICE_22):
            os.unlink(SERVICE_22)

        try:
            subprocess.check_output([CONVERT_21_22, '-f', SERVICE_21,
                                     '-o', SERVICE_22])
            s = ServiceDef()
            s.load(SERVICE_22)

            t = s.find('#/types/type3')
            t.validate({'key1': 15})

        finally:
            if os.path.exists(SERVICE_22):
                os.unlink(SERVICE_22)