'Ensure the view still returns results even if get_courses() returns an ErrorDescriptor. The ErrorDescriptor
should be filtered out.'

def test_course_error(self):

    error_descriptor = ErrorDescriptor.from_xml('<course></course>', get_test_system(), CourseLocationManager(CourseLocator(org='org', course='course', run='run')), None)
    descriptors = [error_descriptor, self.empty_course, self.course]
    with patch('xmodule.modulestore.mixed.MixedModuleStore.get_courses', Mock(return_value=descriptors)):
        self.test_get()
