'The API object returned by ``cinder_from_configuration`` will retry
authentication even when initial authentication attempts fail.
The API is tested against a Mimic server which...mimics the OpenStack
Keystone auth and Cinder APIs.
The blocking IBlockDeviceAPI operations are performed in a thread to
avoid blocking the Twisted reactor which is running the mimic server.'

def test_retry_authentication(self):

    d = mimic_for_test(test_case=self)
    d.addCallback((lambda listening_port: deferToThread(self._build_and_test_api, listening_port)))
    return d
