Пример #1
0
    def testMalformedReleaseFileRedHatish(self):
        path = os.path.join(self.parser_test_dir, "oracle-release-bad")
        with open(path) as f:
            data = f.read()
        parser = linux_release_parser.ReleaseFileParseHandler("OracleLinux")
        parser(data)

        complete, result = parser.Parse()

        self.assertFalse(complete)
        self.assertTupleEqual(("OracleLinux", 0, 0), result)
Пример #2
0
    def testReleaseFileRedHatish(self):
        path = os.path.join(self.base_path, "oracle-release")
        with open(path) as f:
            data = f.read()
        parser = linux_release_parser.ReleaseFileParseHandler("OracleLinux")
        parser(data)

        complete, result = parser.Parse()

        self.assertTrue(complete)
        self.assertTupleEqual(("OracleLinux", 6, 5), result)