'Given that I visit an empty course before import
I should not see a section named \'Section\' or \'Entrance Exam\'
When I visit the import page
And I upload a course that has an entrance exam section named \'Entrance Exam\'
And I visit the course outline page again
The section named \'Entrance Exam\' should now be available
When I visit the LMS Course Home page
Then I should see a section named \'Section\' or \'Entrance Exam\'
When I switch the view mode to student view
Then I should only see a section named \'Entrance Exam\'
When I visit the courseware page
Then a message regarding the \'Entrance Exam\''

def test_course_updated_with_entrance_exam(self):

    self.landing_page.visit()
    self.assertRaises(IndexError, self.landing_page.section, 'Section')
    self.assertRaises(IndexError, self.landing_page.section, 'Entrance    Exam')
    self.import_page.visit()
    self.import_page.upload_tarball(self.tarball_name)
    self.import_page.wait_for_upload()
    self.landing_page.visit()
    self.landing_page.section('Entrance    Exam')
    self.landing_page.section('Section')
    self.landing_page.view_live()
    course_home = CourseHomePage(self.browser, self.course_id)
    course_home.visit()
    self.assertEqual(course_home.outline.num_sections, 2)
    course_home.preview.set_staff_view_mode('Learner')
    self.assertEqual(course_home.outline.num_sections, 1)
    courseware = CoursewarePage(self.browser, self.course_id)
    courseware.visit()
    StaffCoursewarePage(self.browser, self.course_id).set_staff_view_mode('Learner')
    self.assertIn('To    access    course    materials,    you    must    score', courseware.entrance_exam_message_selector.text[0])
