'Tests that the driver doesn\'t fail to initialize if one of the
imported volume drivers raises InvalidConnectorProtocol from os-brick.'

@mock.patch.object(libvirt_driver.LOG, 'debug')
def test_get_volume_driver_invalid_connector_exception(self, mock_debug):

    libvirt_volume_drivers_copy = copy.copy(libvirt_driver.libvirt_volume_drivers)
    libvirt_volume_drivers_copy.append('invalid=nova.tests.unit.virt.libvirt.test_driver.FakeInvalidVolumeDriver')
    with mock.patch.object(libvirt_driver, 'libvirt_volume_drivers', libvirt_volume_drivers_copy):
        drvr = libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), read_only=True)
    self.assertNotIn('invalid', drvr.volume_drivers)
    mock_debug.assert_called_with('Unable    to    load    volume    driver    %s.    It    is    not    supported    on    this    host.', 'nova.tests.unit.virt.libvirt.test_driver.FakeInvalidVolumeDriver')
