'Test that enterprise data sharing consent is required when enabled for the various courseware views.'

@patch.dict('django.conf.settings.FEATURES', {'ALLOW_WIKI_ROOT_ACCESS': True})
def test_consent_required(self):

    course = CourseFactory.create()
    course.allow_public_wiki_access = False
    course.save()
    course_id = unicode(course.id)
    self.login(self.student, self.password)
    self.enroll(course)
    for (url, status_code) in ((reverse('course_wiki', kwargs={'course_id': course_id}), 302), ('/courses/{}/wiki/'.format(course_id), 200)):
        self.verify_consent_required(self.client, url, status_code)
