Exemplo n.º 1
0
 def test_reinstall_paste_ini_idempotent(self, kv):
     """Ensure that re-running does not re-install files"""
     test_kv = SimpleKV()
     test_kv.set(utils.PASTE_INI_MARKER, True)
     kv.return_value = test_kv
     utils.reinstall_paste_ini()
     self.assertFalse(self.apt_install.called)
Exemplo n.º 2
0
 def test_reinstall_paste_ini_idempotent(self, kv):
     """Ensure that re-running does not re-install files"""
     test_kv = SimpleKV()
     test_kv.set(utils.PASTE_INI_MARKER, True)
     kv.return_value = test_kv
     utils.reinstall_paste_ini()
     self.assertFalse(self.apt_install.called)
Exemplo n.º 3
0
 def test_reinstall_paste_ini_fix_upgrade(self, kv, mock_os_release,
                                          mock_exists):
     mock_exists.return_value = False
     mock_os_release.return_value = "queens"
     test_kv = SimpleKV()
     test_kv.set(utils.PASTE_INI_MARKER, True)
     kv.return_value = test_kv
     utils.reinstall_paste_ini()
     self.assertTrue(self.apt_install.called)
Exemplo n.º 4
0
 def test_reinstall_paste_ini_idempotent(self, kv, mock_os_release,
                                         mock_exists):
     """Ensure that re-running does not re-install files"""
     mock_exists.return_value = True
     mock_os_release.return_value = "queens"
     test_kv = SimpleKV()
     test_kv.set(utils.PASTE_INI_MARKER, True)
     kv.return_value = test_kv
     utils.reinstall_paste_ini()
     self.assertFalse(self.apt_install.called)