class documentation

class ClientMixin:

Known subclasses: django.test.client.AsyncClient, django.test.client.Client

View In Hierarchy

Mixin with common methods between Client and AsyncClient.
Method ​_login Undocumented
Method ​_parse​_json Undocumented
Method check​_exception Look for a signaled exception, clear the current context exception data, re-raise the signaled exception, and clear the signaled exception from the local cache.
Method force​_login Undocumented
Method login Set the Factory to appear as if it has successfully logged into a site.
Method logout Log out the user by removing the cookies and session object.
Method store​_exc​_info Store exceptions when they are generated by a view.
Instance Variable cookies Undocumented
Instance Variable exc​_info Undocumented
Property session Return the current session variables.
def _login(self, user, backend=None):

Undocumented

def _parse_json(self, response, **extra):

Undocumented

def check_exception(self, response):
Look for a signaled exception, clear the current context exception data, re-raise the signaled exception, and clear the signaled exception from the local cache.
def force_login(self, user, backend=None):

Undocumented

def login(self, **credentials):

Set the Factory to appear as if it has successfully logged into a site.

Return True if login is possible or False if the provided credentials are incorrect.

def logout(self):
Log out the user by removing the cookies and session object.
def store_exc_info(self, **kwargs):
Store exceptions when they are generated by a view.
cookies =

Undocumented

exc_info =
@property
session =
Return the current session variables.