def test_ok_01(self): packageversion_list = [(1, 0), (1, 0)] required = [[(1, 0)], [(1, 0)]] self.assertEqual(pv.checkAllPackagesVersions(packageversion_list, required), pv.VERSION_OK)
def test_fail_04(self): packageversion_list = [(1, 0), (2, 0)] required = [[(1, 0)], [(1, 0)]] self.assertEqual(pv.checkAllPackagesVersions(packageversion_list, required), pv.PLUGIN_MUST_BE_UPGRADED)
def test_fail_03(self): packageversion_list = [(1, 0), (1, 0)] required = [[(1, 0)], [(1, 1)]] self.assertEqual(pv.checkAllPackagesVersions(packageversion_list, required), pv.OUTWIKER_MUST_BE_UPGRADED)
def test_ok_01(self): packageversion_list = [(1, 0), (1, 0)] required = [[(1, 0)], [(1, 0)]] self.assertEqual( pv.checkAllPackagesVersions(packageversion_list, required), pv.VERSION_OK)
def test_fail_04(self): packageversion_list = [(1, 0), (2, 0)] required = [[(1, 0)], [(1, 0)]] self.assertEqual( pv.checkAllPackagesVersions(packageversion_list, required), pv.PLUGIN_MUST_BE_UPGRADED)
def test_fail_03(self): packageversion_list = [(1, 0), (1, 0)] required = [[(1, 0)], [(1, 1)]] self.assertEqual( pv.checkAllPackagesVersions(packageversion_list, required), pv.OUTWIKER_MUST_BE_UPGRADED)
def __checkPackageVersions(self, appinfo): if appinfo is None: return pv.PLUGIN_MUST_BE_UPGRADED required_versions = [ appinfo.requirements.packages_versions.get('core', [(1, 0)]), appinfo.requirements.packages_versions.get(u'gui', [(1, 0)]), appinfo.requirements.packages_versions.get(u'pages', [(1, 0)]), appinfo.requirements.packages_versions.get(u'actions', [(1, 0)]), appinfo.requirements.packages_versions.get(u'utilites', [(1, 0)]), appinfo.requirements.packages_versions.get(u'libs', [(1, 0)]), ] return pv.checkAllPackagesVersions(self.__currentPackageVersions, required_versions)