def METHOD_NAME(self):
    """
    libvirtMock will raise an error when nodeDeviceLookupByName is called.
    When getLibVersion is called
    (used by libvirtconnection to recognize disconnections)
    it will not raise an error -> in that case an error should be raised
    ('Unknown libvirterror').
    """
    with run_libvirt_event_loop():
        connection = libvirtconnection.get(killOnFailure=True)
        LibvirtMock.virConnect.failNodeDeviceLookupByName = True
        LibvirtMock.virConnect.failGetLibVersion = False
        self.assertRaises(LibvirtMock.libvirtError,
                          connection.nodeDeviceLookupByName)