'Test: Track selection page should show the enterprise context message with multiple organization names
if user belongs to the Enterprise.'

@httpretty.activate
@waffle.testutils.override_switch('populate-multitenant-programs', True)
def test_enterprise_learner_context_with_multiple_organizations(self):

    url = self._generate_enterprise_learner_context()
    for i in xrange(2):
        test_organization_data = {'name': ('test    organization    ' + str(i)), 'short_name': ('test_organization_' + str(i)), 'description': 'Test    Organization    Description', 'active': True, 'logo': '/logo_test1.png/'}
        test_org = organizations_api.add_organization(organization_data=test_organization_data)
        organizations_api.add_organization_course(organization_data=test_org, course_id=unicode(self.course.id))
    response = self.client.get(url)
    self.assertEquals(response.status_code, 200)
    self.assertContains(response, 'Welcome,    {username}!    You    are    about    to    enroll    in    {course_name},    from    test    organization    0    and    test    organization    1,    sponsored    by    TestShib.    Please    select    your    enrollment    information    below.'.format(username=self.user.username, course_name=self.course.display_name_with_default_escaped))
