@mock.patch('cloudferry.lib.utils.local.run')
def test_copy_bbcp(self, mock_run):
    with self.mock_runner() as runner:
        self.copier.copy_bbcp('fake_host', 'src')
        self.assertCalledOnce(runner.run)
        mock_run.assert_not_called()
        runner.reset_mock()
        runner.run.side_effect = (remote_runner.RemoteExecutionError, None)
        self.copier.copy_bbcp('fake_host', 'src')
        self.assertEqual(2, runner.run.call_count)
        self.assertCalledOnce(mock_run)
@mock.patch('cloudferry.lib.utils.local.run')
def test_copy_bbcp(self, mock_run):
    with self.mock_runner() as runner:
        self.copier.copy_bbcp('fake_host', 'src')
        self.assertCalledOnce(runner.run)
        mock_run.assert_not_called()
        runner.reset_mock()
        runner.run.side_effect = (remote_runner.RemoteExecutionError, None)
        self.copier.copy_bbcp('fake_host', 'src')
        self.assertEqual(2, runner.run.call_count)
        self.assertCalledOnce(mock_run)