module documentation
In-memory version of treq for testing.
Class |
|
Since Twisted adds headers to a request, such as the host and the content length, it's necessary to test whether request headers CONTAIN the expected headers (the ones that are not automatically added by Twisted). |
Class |
|
For an example usage, see :meth:`RequestSequence.consume`. |
Class |
|
:obj:`~twisted.web.iweb.IAgent` implementation that issues an in-memory request rather than going out to a real network socket. |
Class |
|
A resource that takes a callable with 5 parameters ``(method, url, params, headers, data)`` and returns ``(code, headers, body)``. |
Class |
|
A fake version of the treq module that can be used for testing that provides all the function calls exposed in :obj:`treq.__all__`. |
Class | _ |
An endpoint factory used by :class:`RequestTraversalAgent`. |
Class | _ |
A partial implementation of an :obj:`IBodyProducer` which produces its entire payload immediately. There is no way to access to an instance of this object from :obj:`RequestTraversalAgent` or :obj:`StubTreq`, or even a :obj:`Resource: passed to :obj:`StubTreq`. |
Function | _maybe |
Encode `someStr` to ASCII if required. |
Function | _maybe |
Convert a headers mapping to its bytes-encoded form. |
Function | _reject |
Decorator that rejects the 'files' keyword argument to the request functions, because that is not handled by this yet. |