If the hook_zca argument is True, setUp will attempt
to perform the operation zope.component.getSiteManager.sethook(pyramid.threadlocal.get_current_registry), which will cause
the Zope Component Architecture global API
(e.g. zope.component.getSiteManager(),
zope.component.getAdapter(), and so on) to use the registry
constructed by setUp as the value it returns from
zope.component.getSiteManager(). If the
zope.component package cannot be imported, or if
hook_zca is False, the hook will not be set.

If settings is not None, it must be a dictionary representing the
values passed to a Configurator as its settings= argument.

If the unhook_zca argument is True (the default), call
zope.component.getSiteManager.reset(). This undoes the
action of pyramid.testing.setUp() called with the
argument hook_zca=True. If zope.component cannot be
imported, ignore the argument.

Create a clone of the resource object. If __name__ or
__parent__ arguments are passed, use these values to
override the existing __name__ or __parent__ of the
resource. If any extra keyword args are passed in via the kw
argument, use these keywords to add to or override existing
resource keywords (attributes).

The params, environ, headers, path, and
cookies arguments correspond to their WebOb
equivalents.

The post argument, if passed, populates the request’s
POST attribute, but notparams, in order to allow testing
that the app accepts data for a given view only from POST requests.
This argument also sets self.method to “POST”.

Extra keyword arguments are assigned as attributes of the request
itself.

Note that DummyRequest does not have complete fidelity with a “real”
request. For example, by default, the DummyRequest GET and POST
attributes are of type dict, unlike a normal Request’s GET and POST,
which are of type MultiDict. If your code uses the features of
MultiDict, you should either use a”real” pyramid.request.Request
or adapt your DummyRequest by replacing the attributes with MultiDict
instances.

Other similar incompatibilities exist. If you need all the features of
a Request, use the pyramid.request.Request class itself rather
than this class while writing tests.

An instance of this class is returned from
pyramid.config.Configurator.testing_add_renderer(). It has a
helper function (assert_) that makes it possible to make an
assertion which compares data passed to the renderer by the view
function against expected key/value pairs.

Accept an arbitrary set of assertion key/value pairs. For
each assertion key/value pair assert that the renderer
(eg. pyramid.renderer.render_to_response())
received the key with a value that equals the asserted
value. If the renderer did not receive the key at all, or the
value received by the renderer doesn’t match the assertion
value, raise an AssertionError.