l.t.views : module documentation

Part of lp.testing

Functions to help with the testing of views.
Function create_view Return a view based on the given arguments.
Function create_initialized_view Return a view that has already been initialized.
Function create_webservice_error_view Return a view of the error with a webservice request.
def create_view(context, name, form=None, layer=None, server_url=None, method='GET', principal=None, query_string='', cookie='', request=None, path_info='/', current_request=False, rootsite=None, **kwargs):
Return a view based on the given arguments.

:param context: The context for the view.
:param name: The web page the view should handle.
:param form: A dictionary with the form keys.
:param layer: The layer where the page we are interested in is located.
:param server_url: The URL from where this request was done.
:param method: The method used in the request. Defaults to 'GET'.
:param principal: The principal for the request, default to the
    unauthenticated principal.
:param query_string: The query string for the request.
:param cookie: The HTTP_COOKIE value for the request.
:param request: Use this request instead of creating a new one.
:param path_info: The PATH_INFO value for the request.
:param current_request: If True, the request will be set as the current
    interaction.
:param **kwargs: Any other parameter for the request.
:return: The view class for the given context and the name.
def create_initialized_view(context, name, form=None, layer=None, server_url=None, method=None, principal=None, query_string=None, cookie=None, request=None, path_info='/', rootsite=None, current_request=False, **kwargs):
Return a view that has already been initialized.
def create_webservice_error_view(error):
Return a view of the error with a webservice request.
API Documentation for Launchpad, generated by pydoctor at 2018-10-20 00:00:08.