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.
Attributes
| Attribute | Type | Description |
|---|---|---|
| enforce_csrf_checks | boolean = True | A boolean flag that determines whether the handler should validate CSRF tokens on incoming requests. |
Constructor
Signature
def ClientHandler(
enforce_csrf_checks: boolean = True,
*args: any,
**kwargs: any
)
Parameters
| Name | Type | Description |
|---|---|---|
| enforce_csrf_checks | boolean = True | Determines whether CSRF protection middleware should be enforced during requests. |
| *args | any | Variable length argument list passed to the base class. |
| **kwargs | any | Arbitrary keyword arguments passed to the base class. |