def is_forbidden(self,<EOL>user=None,<EOL>data=None,<EOL>ajax=False,<EOL>no_redirect=False,<EOL>add_session=False,<EOL>post=False,<EOL>kwargs=None,<EOL>msg=None):
resp = self.get(<EOL>user=user,<EOL>data=data,<EOL>ajax=ajax,<EOL>no_redirect=no_redirect,<EOL>add_session=add_session,<EOL>kwargs=kwargs)<EOL>user_msg = user or self.get_user()<EOL>if self.get_view_class() is not None:<EOL><INDENT>view_msg = self.get_view_class()<EOL><DEDENT>else:<EOL><INDENT>view_msg = self.get_view()<EOL><DEDENT>if not msg:<EOL><INDENT>msg = ('<STR_LIT>'<EOL>'<STR_LIT>').format(view_msg, user_msg)<EOL><DEDENT>self.assertEqual(resp.status_code, <NUM_LIT>, msg=msg)<EOL>return resp<EOL>
Checks if the view is not allowed to be called.