def _check_callable(self,<EOL>method='<STR_LIT>',<EOL>data=None,<EOL>message=None,<EOL>kwargs=None,<EOL>user=None,<EOL>anonymous=False,<EOL>and_redirects_to=None,<EOL>status_code=None,<EOL>called_by='<STR_LIT>',<EOL>ajax=False,<EOL>no_redirect=False,<EOL>extra=None):
<EOL>if extra is None:<EOL><INDENT>extra = {}<EOL><DEDENT>if called_by == '<STR_LIT>':<EOL><INDENT>message_addin = '<STR_LIT>'<EOL><DEDENT>elif called_by == '<STR_LIT>':<EOL><INDENT>message_addin = '<STR_LIT>'<EOL><DEDENT>if user:<EOL><INDENT>self.login(user)<EOL><DEDENT>if anonymous:<EOL><INDENT>self.client.logout()<EOL><DEDENT>if not status_code and and_redirects_to:<EOL><INDENT>status_code = <NUM_LIT><EOL><DEDENT>if not status_code and called_by == '<STR_LIT>':<EOL><INDENT>status_code = <NUM_LIT:200><EOL><DEDENT>if not status_code and called_by == '<STR_LIT>':<EOL><INDENT>status_code = <NUM_LIT><EOL><DEDENT>client_args = (<EOL>self.get_url(view_kwargs=kwargs or self.get_view_kwargs()),<EOL>data or self.get_data_payload(),<EOL>)<EOL>if ajax:<EOL><INDENT>extra.update({'<STR_LIT>': '<STR_LIT>'})<EOL><DEDENT>if method.lower() == '<STR_LIT>':<EOL><INDENT>resp = self.client.get(*client_args, **extra)<EOL><DEDENT>elif method.lower() == '<STR_LIT>':<EOL><INDENT>resp = self.client.post(*client_args, **extra)<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>'.format(method))<EOL><DEDENT>if resp.status_code == <NUM_LIT> and not and_redirects_to and not (<EOL>status_code in [<NUM_LIT:200>, <NUM_LIT>]):<EOL><INDENT>sys.stderr.write(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if and_redirects_to:<EOL><INDENT>self.assertRedirects(<EOL>resp,<EOL>and_redirects_to,<EOL>status_code=status_code,<EOL>msg_prefix=('<STR_LIT>'))<EOL><DEDENT>else:<EOL><INDENT>self.assertIn(<EOL>resp.status_code, [status_code, <NUM_LIT>],<EOL>msg=(message or<EOL>'<STR_LIT>'.format(message_addin)))<EOL><DEDENT>return resp<EOL>
The method that does the actual assertions for ``is_callable`` and
``is_not_callable``.

:method: 'get' or 'post'. Default is 'get'.
:data: Post data or get data payload.
:message: Lets you override the assertion message.
:kwargs: Lets you override the view kwargs.
:user: If user argument is given, it logs it in first.
:anonymous: If True, it logs out the user first. Default is False
:and_redirects_to: If set, it additionally makes an assertRedirect on
    whatever string is given. This can be either a relative url or a
    name.
:status_code: Overrides the expected status code. Default is 200.
    Can either be a list of status codes or a single integer.
:called_by: A string that is either 'is_callable' or 'is_not_callable'.
:extra: Additional parameters to be passed to the client GET/POST. For
    example, follow = True if you want the client to follow redirects.