def redirects(self,<EOL>to=None,<EOL>to_url_name=None,<EOL>next_url='<STR_LIT>',<EOL>user=None,<EOL>add_session=False,<EOL>session_dict={},<EOL>kwargs=None,<EOL>msg=None,<EOL>data=None):
resp = self.get(<EOL>user=user,<EOL>add_session=add_session,<EOL>kwargs=kwargs,<EOL>session_dict=session_dict,<EOL>data=data)<EOL>if to or to_url_name:<EOL><INDENT>if next_url:<EOL><INDENT>next_url = '<STR_LIT>'.format(next_url)<EOL><DEDENT>if to_url_name:<EOL><INDENT>if msg is None:<EOL><INDENT>msg = (<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT>self.assertEqual(<EOL>resolve(resp.url).url_name, to_url_name, msg=msg)<EOL><DEDENT>else:<EOL><INDENT>redirect_url = '<STR_LIT>'.format(to, next_url)<EOL>self.assertRedirects(resp, redirect_url, msg=msg)<EOL><DEDENT><DEDENT>return resp<EOL>
Checks for redirects from a GET request.