'Creates a course with 3 orphan modules, one of which
has a child that\'s also in the course tree.'

def create_course_with_orphans(self, default_store):

    course = CourseFactory.create(default_store=default_store)
    chapter1 = self.store.create_child(self.user.id, course.location, 'chapter', 'Chapter1')
    self.store.publish(chapter1.location, self.user.id)
    chapter2 = self.store.create_child(self.user.id, course.location, 'chapter', 'Chapter2')
    self.store.publish(chapter2.location, self.user.id)
    orphan_chapter = self.store.create_item(self.user.id, course.id, 'chapter', 'OrphanChapter')
    self.store.publish(orphan_chapter.location, self.user.id)
    vertical1 = self.store.create_child(self.user.id, chapter1.location, 'vertical', 'Vertical1')
    self.store.publish(vertical1.location, self.user.id)
    orphan_vertical = self.store.create_item(self.user.id, course.id, 'vertical', 'OrphanVert')
    self.store.publish(orphan_vertical.location, self.user.id)
    html1 = self.store.create_child(self.user.id, vertical1.location, 'html', 'Html1')
    self.store.publish(html1.location, self.user.id)
    multi_parent_html = self.store.create_child(self.user.id, vertical1.location, 'html', 'multi_parent_html')
    self.store.publish(multi_parent_html.location, self.user.id)
    orphan_vertical.children.append(multi_parent_html.location)
    self.store.update_item(orphan_vertical, self.user.id)
    orphan_html = self.store.create_item(self.user.id, course.id, 'html', 'OrphanHtml')
    self.store.publish(orphan_html.location, self.user.id)
    self.store.create_child(self.user.id, course.location, 'static_tab', 'staticuno')
    self.store.create_child(self.user.id, course.location, 'course_info', 'updates')
    return course
