'Scenario: Ensure that entrance exam status message is updated and courseware is unblocked as soon as
student passes entrance exam.
Given I have a course with entrance exam as pre-requisite
When I pass entrance exam
Then I can see complete TOC of course
And I can see message indicating my pass status
When I switch to course home page
Then I see 2 sections'

def test_course_is_unblocked_as_soon_as_student_passes_entrance_exam(self):

    self.courseware_page.visit()
    problem_page = ProblemPage(self.browser)
    self.assertEqual(problem_page.wait_for_page().problem_name, 'HEIGHT    OF    EIFFEL    TOWER')
    self.assertTrue(self.courseware_page.has_entrance_exam_message())
    self.assertFalse(self.courseware_page.has_passed_message())
    problem_page.click_choice('choice_1')
    problem_page.click_submit()
    self.courseware_page.wait_for_page()
    self.assertTrue(self.courseware_page.has_passed_message())
    course_home_page = CourseHomePage(self.browser, self.course_id)
    course_home_page.visit()
    self.assertEqual(course_home_page.outline.num_sections, 2)
