コード例 #1
0
 def testPackagesList(self):
     package = common.Package1(self.config, None, None)
     metapackage = common.MetaPackage(self.config, None)
     self.store.add_package(package)
     self.store.add_package(metapackage)
     l = sorted([package, metapackage], key=lambda x: x.name)
     self.assertEqual(l, self.store.get_packages_list())
コード例 #2
0
 def testMetaPackageDeps(self):
     metapackage = common.MetaPackage(self.config, None)
     self.store.add_package(metapackage)
     # the metapackage depends on package that are not yet in the store
     self.failUnlessRaises(PackageNotFoundError,
         self.store.get_package_deps, metapackage.name)
     for klass in [common.Package1, common.Package2, common.Package3,
             common.Package4]:
         p = klass(self.config, None, None)
         self.store.add_package(p)
     for klass in [common.MetaPackage]:
         p = klass(self.config, None)
         self.store.add_package(p)
     deps = ['gstreamer-test-bindings', 'gstreamer-test1',
             'gstreamer-test2', 'gstreamer-test3']
     res = [x.name for x in self.store.get_package_deps(metapackage.name)]
     self.assertEquals(sorted(deps), sorted(res))