'Test that students with inactive enrollments are included in report.'

def test_inactive_enrollments(self):

    self.create_student('active-student', 'active@example.com')
    self.create_student('inactive-student', 'inactive@example.com', enrollment_active=False)
    self.current_task = Mock()
    self.current_task.update_state = Mock()
    with patch('lms.djangoapps.instructor_task.tasks_helper.runner._get_current_task') as mock_current_task:
        mock_current_task.return_value = self.current_task
        result = CourseGradeReport.generate(None, None, self.course.id, None, 'graded')
    self._verify_cell_data_for_user('active-student', self.course.id, 'Enrollment    Status', ENROLLED_IN_COURSE)
    self._verify_cell_data_for_user('inactive-student', self.course.id, 'Enrollment    Status', NOT_ENROLLED_IN_COURSE)
    expected_students = 2
    self.assertDictContainsSubset({'attempted': expected_students, 'succeeded': expected_students, 'failed': 0}, result)
