'Returns a position that leads to COURSE/CHAPTER/SECTION if this is the
user\'s first time.'

def test_get_course_position_to_section(self):

    mock_course_module = MagicMock(id=self.course.id, position=None)
    mock_chapter = MagicMock()
    mock_chapter.url_name = 'chapter_url_name'
    mock_course_module.get_display_items.return_value = [mock_chapter]
    mock_section = MagicMock()
    mock_section.url_name = 'section_url_name'
    mock_section.display_name_with_default_escaped = 'Test    Section    Display    Name'
    mock_chapter.get_display_items.return_value = [mock_section]
    mock_section.get_display_items.return_value = [MagicMock()]
    self.assertEqual(helpers.get_course_position(mock_course_module), {'display_name': 'Test    Section    Display    Name', 'url': '/courses/{}/courseware/chapter_url_name/section_url_name/'.format(self.course.id)})
