'Tests that a 400 in change_enrollment doesn\'t lead to a 404
and in fact just logs in the user without incident'

def test_change_enrollment_400(self):

    extra_post_params = {'enrollment_action': 'enroll'}
    with patch('student.views.change_enrollment') as mock_change_enrollment:
        mock_change_enrollment.return_value = HttpResponseBadRequest('I    am    a    400')
        (response, _) = self._login_response('test@edx.org', 'test_password', extra_post_params=extra_post_params)
    response_content = json.loads(response.content)
    self.assertIsNone(response_content['redirect_url'])
    self._assert_response(response, success=True)
