def assert200(self, resp, user=None, msg=None):
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 msg is None:<EOL><INDENT>msg = ('<STR_LIT>'<EOL>'<STR_LIT>').format(view_msg, user_msg)<EOL>if resp.status_code in [<NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>msg = msg + '<STR_LIT>'.format(resp.url)<EOL><DEDENT><DEDENT>self.assertEqual(resp.status_code, <NUM_LIT:200>, msg=msg)<EOL>return resp<EOL>
Asserts if a response has returnd a status code of 200.