Undocumented
Class | RedirectCycleError |
The test client has been asked to follow a redirect loop. |
Constant | BOUNDARY |
Undocumented |
Constant | CONTENT_TYPE_RE |
Undocumented |
Constant | JSON_CONTENT_TYPE_RE |
Undocumented |
Constant | MULTIPART_CONTENT |
Undocumented |
Class | AsyncClient |
An async version of Client that creates ASGIRequests and calls through an async request path. |
Class | AsyncClientHandler |
An async version of ClientHandler. |
Class | AsyncRequestFactory |
Class that lets you create mock ASGI-like Request objects for use in testing. Usage: |
Class | Client |
A class that can act as a client for testing purposes. |
Class | ClientHandler |
An HTTP Handler that can be used for testing purposes. Use the WSGI interface to compose requests, but return the raw HttpResponse object with the originating WSGIRequest attached to its wsgi_request attribute. |
Class | ClientMixin |
Mixin with common methods between Client and AsyncClient. |
Class | FakePayload |
No summary |
Class | RequestFactory |
Class that lets you create mock Request objects for use in testing. |
Function | closing_iterator_wrapper |
Undocumented |
Function | conditional_content_removal |
Simulate the behavior of most web servers by removing the content of responses for HEAD requests, 1xx, 204, and 304 responses. Ensure compliance with RFC 7230, section 3.3.3. |
Function | encode_file |
Undocumented |
Function | encode_multipart |
Encode multipart POST data from a dictionary of form values. |
Function | store_rendered_templates |
Store templates and contexts that are rendered. |
Encode multipart POST data from a dictionary of form values.
The key will be used as the form data name; the value will be transmitted as content. If the value is a file, the contents of the file will be sent as an application/octet-stream; otherwise, str(value) will be sent.