'driver should switch connection if it has been failed over.'

@mock.patch.object(proxy.IBMStorageProxy, '__init__')
@mock.patch.object(replication, 'Replication')
@mock.patch.object(replication.Replication, 'switch_source_and_target_client')
def test_switch_backend_connection(self, mock_switch_connection, mock_replication, mock_proxy_init):

    ds8k_proxy = ds8kproxy.DS8KProxy(self.storage_info, self.logger, self.exception, self, TEST_TARGET_DS8K_IP)
    src_helper = FakeDS8KCommonHelper(self.configuration, None)
    mock_replication.return_value = FakeReplication(src_helper, TEST_REPLICATION_DEVICE)
    ds8k_proxy._do_replication_setup([TEST_REPLICATION_DEVICE], src_helper)
    self.assertTrue(mock_switch_connection.called)
