コード例 #1
0
    def testInit(self):
        config = Config()

        # Test default values
        package = Package1(config, None, None)
        packager = linux.LinuxPackager(config, package, None)
        self.assertEquals(packager.package_prefix, '')
        self.assertEquals(packager.full_package_name, 'gstreamer-test1-1.0')
        self.assertEquals(packager.packager, DEFAULT_PACKAGER)

        # Test packages_prefix and packager
        config.packages_prefix = 'test'
        config.packager = 'Pin <*****@*****.**>'
        packager = linux.LinuxPackager(config, package, None)
        self.assertEquals(packager.package_prefix, 'test-')
        self.assertEquals(packager.full_package_name,
                          'test-gstreamer-test1-1.0')
        self.assertEquals(packager.packager, 'Pin <*****@*****.**>')

        # Test ignore package
        package.ignore_package_prefix = True
        packager = linux.LinuxPackager(config, package, None)
        self.assertEquals(packager.package_prefix, '')
        self.assertEquals(packager.full_package_name, 'gstreamer-test1-1.0')
コード例 #2
0
 def setUp(self):
     self.config = Config()
     self.store = create_store(self.config)
     self.packager = linux.LinuxPackager(
         self.config, self.store.get_package('gstreamer-runtime'),
         self.store)
コード例 #3
0
 def setUp(self):
     self.config = Config()
     self.config.cache_file = '/dev/null'
     self.cookbook = CookBook(self.config, False)