module documentation

Undocumented

Class RequestRecord The details of a call to :meth:`_AgentSpy.request`
Function agent_spy Record HTTP requests made with an agent
Class _AgentSpy An agent that records HTTP requests
def agent_spy(): (source)

Record HTTP requests made with an agent This is suitable for low-level testing of wrapper agents. It validates the parameters of each call to :meth:`IAgent.request` (synchronously raising :exc:`TypeError`) and captures them as a :class:`RequestRecord`, which can then be used to inspect the request or generate a response by firing the :attr:`~RequestRecord.deferred`. :returns: A two-tuple of: - An :class:`twisted.web.iweb.IAgent` - A list of calls made to the agent's :meth:`~twisted.web.iweb.IAgent.request()` method