'Test that blocks used from a library can have children.'

def test_block_with_children(self):

    data_value = 'A    Scope.content    value'
    name_value = 'A    Scope.settings    value'
    vert_block = ItemFactory.create(category='vertical', parent_location=self.library.location, user_id=self.user.id, publish_item=False)
    child_block = ItemFactory.create(category='html', parent_location=vert_block.location, user_id=self.user.id, publish_item=False, display_name=name_value, data=data_value)
    self.assertEqual(child_block.data, data_value)
    self.assertEqual(child_block.display_name, name_value)
    with modulestore().default_store(ModuleStoreEnum.Type.split):
        course = CourseFactory.create()
    lc_block = self._add_library_content_block(course, self.lib_key)
    lc_block = self._refresh_children(lc_block)
    self.assertEqual(len(lc_block.children), 1)
    course_vert_block = modulestore().get_item(lc_block.children[0])
    self.assertEqual(len(course_vert_block.children), 1)
    course_child_block = modulestore().get_item(course_vert_block.children[0])
    self.assertEqual(course_child_block.data, data_value)
    self.assertEqual(course_child_block.display_name, name_value)
