"""Unit tests for Cisco fc zone client cli."""
+import time
+
import mock
from oslo_concurrency import processutils
from six.moves import range
run_ssh_mock.assert_called_once_with(cmd_list, True)
@mock.patch.object(cli.CiscoFCZoneClientCLI, '_run_ssh')
- def test__cfg_save_with_retry(self, run_ssh_mock):
+ @mock.patch.object(time, 'sleep')
+ def test__cfg_save_with_retry(self, mock_sleep, run_ssh_mock):
cmd_list = ['copy', 'running-config', 'startup-config']
run_ssh_mock.side_effect = [
processutils.ProcessExecutionError,
])
@mock.patch.object(cli.CiscoFCZoneClientCLI, '_run_ssh')
- def test__cfg_save_with_error(self, run_ssh_mock):
+ @mock.patch.object(time, 'sleep')
+ def test__cfg_save_with_error(self, mock_sleep, run_ssh_mock):
cmd_list = ['copy', 'running-config', 'startup-config']
run_ssh_mock.side_effect = processutils.ProcessExecutionError