'Test that blocks used from a library have the same field values as
defined by the library author.'

def test_fields(self):

    data_value = 'A    Scope.content    value'
    name_value = 'A    Scope.settings    value'
    lib_block = ItemFactory.create(category='html', parent_location=self.library.location, user_id=self.user.id, publish_item=False, display_name=name_value, data=data_value)
    self.assertEqual(lib_block.data, data_value)
    self.assertEqual(lib_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)
    course_block = modulestore().get_item(lc_block.children[0])
    self.assertEqual(course_block.data, data_value)
    self.assertEqual(course_block.display_name, name_value)
