Ejemplo n.º 1
0
 def test_save_old_install(self):
     recipe = self.recipe
     InstallTask(recipe).run()
     task = UpdateTask(recipe)
     task.save_old_install()
     assert pakit.conf.IDB.get(recipe.name) is None
     assert not os.path.exists(recipe.install_dir)
     assert os.path.exists(recipe.install_dir + '_bak')
Ejemplo n.º 2
0
 def test_restore_old_install(self):
     recipe = self.recipe
     InstallTask(recipe).run()
     task = UpdateTask(recipe)
     task.save_old_install()
     task.restore_old_install()
     assert pakit.conf.IDB.get(recipe.name)['hash'] == recipe.repo.src_hash
     assert os.path.exists(recipe.install_dir)
     assert not os.path.exists(recipe.install_dir + '_bak')
     recipe.verify()