def test_deploy_install_configure(self, mock_update, mock_install, mock_sudo, mock_config): rpm_specifier = "/any/path/rpm" mock_sudo.side_effect = self.mock_fail_then_succeed() server.deploy_install_configure(rpm_specifier) mock_install.assert_called_with(rpm_specifier) self.assertTrue(mock_update.called) mock_sudo.assert_called_with('getent passwd presto', quiet=True)
def test_deploy_install_configure(self, mock_update, mock_install, mock_sudo): rpm_specifier = "/any/path/rpm" mock_sudo.side_effect = self.mock_fail_then_succeed() server.deploy_install_configure(rpm_specifier) mock_install.assert_called_with(rpm_specifier) self.assertTrue(mock_update.called) mock_sudo.assert_called_with('getent passwd presto', quiet=True)
def test_deploy_install_configure(self, mock_update, mock_install): local_path = "/any/path/rpm" env.hosts = [] server.deploy_install_configure(local_path) mock_install.assert_called_with(local_path) mock_update.assert_called_with()