Beispiel #1
0
    def test_get_dependency_info(self):

        pkg = 'reportbug'
        result = utils.get_dependency_info('reportbug', '')

        self.assertIn('no packages', result)

        result = utils.get_dependency_info('reportbug', [['dpkg']])
        self.assertIn('dpkg', result)

        # check for the provides stuff
        result = utils.get_dependency_info('reportbug', [['awk']])
        self.assertIn('awk', result)
Beispiel #2
0
    def test_get_dependency_info(self):

        pkg = 'reportbug'
        result = utils.get_dependency_info('reportbug', '')

        self.assertIn('no packages', result)

        result = utils.get_dependency_info('reportbug', [['dpkg']])
        self.assertIn('dpkg', result)

        # check for the provides stuff
        result = utils.get_dependency_info('reportbug', [['awk']])
        self.assertIn('awk', result)
Beispiel #3
0
 def test_bts657753(self):
     # check that non-existing deps gets a correct installation info
     # and not just the last one applied to anyone
     result = utils.get_dependency_info('reportbug', (('reportbug', ),
                                                      ('nonexisting', )))
     for line in result.split('\n'):
         if 'nonexisting' in line:
             self.assertFalse(line.startswith('ii'))
Beispiel #4
0
 def test_bts657753(self):
     # check that non-existing deps gets a correct installation info
     # and not just the last one applied to anyone
     result = utils.get_dependency_info('reportbug',
                                        (('reportbug',), ('nonexisting',)))
     for line in result.split('\n'):
         if 'nonexisting' in line:
             self.assertFalse(line.startswith('ii'))
Beispiel #5
0
    def test_bts650659(self):
        # verify that the dependency list doesn't have tailing white spaces

        status = utils.get_package_status('reportbug')
        (pkgversion, pkgavail, depends, recommends, conffiles, maintainer,
         installed, origin, vendor, reportinfo, priority, desc, src_name,
         fulldesc, state, suggests, section) = status

        for l in [depends, recommends, suggests]:
            result = utils.get_dependency_info('reportbug', l)
            for line in result.split('\n'):
                self.assertEqual(line.rstrip(), line)
Beispiel #6
0
    def test_bts650659(self):
        # verify that the dependency list doesn't have tailing white spaces

        status = utils.get_package_status('reportbug')
        (pkgversion, pkgavail, depends, recommends, conffiles, maintainer,
         installed, origin, vendor, reportinfo, priority, desc, src_name,
         fulldesc, state, suggests, section) = status

        for l in [depends, recommends, suggests]:
            result = utils.get_dependency_info('reportbug', l)
            for line in result.split('\n'):
                self.assertEqual(line.rstrip(), line)