'Navigate to a particular unit in the course.'

def test_courseware_nav(self):

    self.course_info_page.visit()
    self.tab_nav.go_to_tab('Course')
    EXPECTED_SECTIONS = {'Test    Section': ['Test    Subsection'], 'Test    Section    2': ['Test    Subsection    2', 'Test    Subsection    3']}
    actual_sections = self.courseware_page.nav.sections
    for (section, subsections) in EXPECTED_SECTIONS.iteritems():
        self.assertIn(section, actual_sections)
        self.assertEqual(actual_sections[section], EXPECTED_SECTIONS[section])
    self.courseware_page.nav.go_to_section('Test    Section', 'Test    Subsection')
    EXPECTED_ITEMS = ['Test    Problem    1', 'Test    Problem    2', 'Test    HTML']
    actual_items = self.courseware_page.nav.sequence_items
    self.assertEqual(len(actual_items), len(EXPECTED_ITEMS))
    for expected in EXPECTED_ITEMS:
        self.assertIn(expected, actual_items)
    self.courseware_page.nav.go_to_section('Test    Section    2', 'Test    Subsection    3')
    self.assertTrue(self.courseware_page.nav.is_on_section('Test    Section    2', 'Test    Subsection    3'))
