'Check that a user\'s access to a course is equal to the user\'s access to
the corresponding course overview.
Instead of taking a user and course directly as arguments, we have to
take their attribute names, as ddt doesn\'t allow us to reference self.
Arguments:
user_attr_name (str): the name of the attribute on self that is the
User to test with.
action (str): action to test with.
course_attr_name (str): the name of the attribute on self that is
the CourseDescriptor to test with.'

@ddt.data(*((COURSE_TEST_DATA + LOAD_MOBILE_TEST_DATA) + PREREQUISITES_TEST_DATA))
@ddt.unpack
@patch.dict('django.conf.settings.FEATURES', {'DISABLE_START_DATES': False})
def test_course_overview_access(self, user_attr_name, action, course_attr_name):

    user = getattr(self, user_attr_name)
    course = getattr(self, course_attr_name)
    course_overview = CourseOverview.get_from_id(course.id)
    self.assertEqual(bool(access.has_access(user, action, course, course_key=course.id)), bool(access.has_access(user, action, course_overview, course_key=course.id)))
