'Tests that, export does not fail when a parent xblock does not have draft child xblock
information but the draft child xblock has parent information.'

@mock.patch('lms.djangoapps.ccx.modulestore.CCXModulestoreWrapper.get_item', mock.Mock(return_value=mock.Mock(children=[])))
def test_export_with_orphan_vertical(self):

    self.store.convert_to_draft(self.problem.location, self.user.id)
    root_dir = path(mkdtemp_clean())
    export_course_to_xml(self.store, None, self.course.id, root_dir, 'test_export')
    export_draft_dir = OSFS((root_dir / 'test_export/drafts'))
    self.assertEqual(len(export_draft_dir.listdir()), 0)
    shutil.rmtree(root_dir)
