TODO: document general info about fakes
When the real thing isn’t available and you have some development to do these fake implementations of various drivers let you get on with your day.
cinder.tests.unit.test_service.FakeManager
Class¶FakeManager
(host=None, db_driver=None, service_name=None, cluster=None)Bases: cinder.manager.Manager
Fake manager for tests.
test_method
()cinder.tests.unit.api.fakes
Module¶Context
Bases: object
FakeAuthDatabase
Bases: object
auth_token_create
(context, token)auth_token_destroy
(context, token_id)auth_token_get
(context, token_hash)data
= {}FakeRateLimiter
(application)Bases: object
FakeRequestContext
(*args, **kwargs)FakeRouter
(ext_mgr=None)Bases: oslo_service.wsgi.Router
FakeToken
(**kwargs)Bases: object
id_count
= 0HTTPRequest
(environ, charset=None, unicode_errors=None, decode_param_names=None, **kw)Bases: webob.request.Request
blank
(*args, **kwargs)Create a blank request environ (and Request wrapper) with the given path (path should be urlencoded), and any keys from environ.
The path will become path_info, with any query string split off and used.
All necessary keys will be added to the environ, but the values you pass in will take precedence. If you pass in base_url then wsgi.url_scheme, HTTP_HOST, and SCRIPT_NAME will be filled in from that value.
Any extra keyword will be passed to __init__
.
TestRouter
(controller)Bases: oslo_service.wsgi.Router
get_fake_uuid
(token=0)wsgi_app
(inner_app_v2=None, fake_auth=True, fake_auth_context=None, use_no_auth=False, ext_mgr=None, inner_app_v3=None)Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.