'Internal helper to support common pieces of test case variations'

def _generate_enterprise_learner_context(self, enable_audit_enrollment=False):

    for mode in ('audit', 'honor', 'verified'):
        CourseModeFactory.create(mode_slug=mode, course_id=self.course.id)
    catalog_integration = self.create_catalog_integration()
    UserFactory(username=catalog_integration.service_username)
    self.mock_course_discovery_api_for_catalog_contains(catalog_id=1, course_run_ids=[str(self.course.id)])
    self.mock_enterprise_learner_api(enable_audit_enrollment=enable_audit_enrollment)
    return reverse('course_modes_choose', args=[unicode(self.course.id)])
