'Test whether get_proctored_exam_results returns an appropriate
status message when users request a CSV file.'

def test_get_student_exam_results(self):

    url = reverse('get_proctored_exam_results', kwargs={'course_id': unicode(self.course.id)})
    response = self.client.post(url, {})
    self.assertEqual(response.status_code, 200)
    task_type = 'proctored_exam_results_report'
    already_running_status = generate_already_running_error_message(task_type)
    with patch('lms.djangoapps.instructor_task.api.submit_proctored_exam_results_report') as submit_task_function:
        error = AlreadyRunningError(already_running_status)
        submit_task_function.side_effect = error
        response = self.client.post(url, {})
        self.assertEqual(response.status_code, 400)
        self.assertIn(already_running_status, response.content)
