Ejemplo n.º 1
0
 def test_backup_and_track_removed_pkg(self):
     control = utils.ChangedRPMPackagesController()
     pkgs = ['pkg1', 'pkg2', 'pkg3']
     for pkg in pkgs:
         control.backup_and_track_removed_pkg(pkg)
     self.assertEqual(utils.RestorablePackage.backup.called, len(pkgs))
     self.assertEqual(len(control.removed_pkgs), len(pkgs))
Ejemplo n.º 2
0
 def test_track_installed_pkg(self):
     control = utils.ChangedRPMPackagesController()
     pkgs = ['pkg1', 'pkg2', 'pkg3']
     for pkg in pkgs:
         control.track_installed_pkg(pkg)
     self.assertEqual(control.installed_pkgs, pkgs)