def _login(self, username, password, ip_addr='<STR_LIT:127.0.0.1>', **kwargs):
post_data = {<EOL>'<STR_LIT:username>': username,<EOL>'<STR_LIT:password>': password,<EOL>}<EOL>post_data.update(kwargs)<EOL>return self.client.post(<EOL>reverse('<STR_LIT>'),<EOL>post_data,<EOL>REMOTE_ADDR=ip_addr,<EOL>HTTP_USER_AGENT='<STR_LIT>'<EOL>)<EOL>
Login a user and get the response.

IP address can be configured to test IP blocking functionality.