'Tests the login lock with a valid username and invalid password
when AXES_LOCK_OUT_BY_COMBINATION_USER_AND_IP is True'

@override_settings(AXES_LOCK_OUT_BY_COMBINATION_USER_AND_IP=True)
def test_lockout_by_combination_user_and_ip(self):

    for i in range(1, FAILURE_LIMIT):
        response = self._login(is_valid_username=True, is_valid_password=False)
        self.assertContains(response, self.LOGIN_FORM_KEY)
    response = self._login(is_valid_username=True, is_valid_password=False)
    self.assertContains(response, self.LOCKED_MESSAGE)
