'Make sure that path_to_location works with a component having multiple vertical parents,
from which one of them is orphan.
course
chapter
vertical vertical
html'

@ddt.data(ModuleStoreEnum.Type.split)
def test_path_to_location_for_orphan_vertical(self, module_store):

    course = self.create_course_with_orphans(module_store)
    vertical1 = self.store.get_item(BlockUsageLocator(course.id, 'vertical', 'Vertical1'))
    chapter1 = self.store.get_item(BlockUsageLocator(course.id, 'chapter', 'Chapter1'))
    orphan_vertical = self.store.get_item(BlockUsageLocator(course.id, 'vertical', 'OrphanVert'))
    multi_parent_html = self.store.get_item(BlockUsageLocator(course.id, 'html', 'multi_parent_html'))
    self.assertIn(orphan_vertical.location, self.store.get_orphans(course.id))
    self.assertIn(multi_parent_html.location, orphan_vertical.children)
    self.assertIn(multi_parent_html.location, vertical1.children)
    html_parent = self.store.get_parent_location(multi_parent_html.location)
    self.assertNotEqual(unicode(html_parent), unicode(orphan_vertical.location))
    self.assertEqual(unicode(html_parent), unicode(vertical1.location))
    path = path_to_location(self.store, multi_parent_html.location)
    expected_path = (course.id, chapter1.location.block_id, vertical1.location.block_id, multi_parent_html.location.block_id, '', path[(-1)])
    self.assertIsNotNone(path)
    self.assertEqual(len(path), 6)
    self.assertEqual(path, expected_path)
