'Test that the same block definition is used for the library and course[s]'

def test_definition_shared_with_library(self):

    block1 = self._add_simple_content_block()
    def_id1 = block1.definition_locator.definition_id
    block2 = self._add_simple_content_block()
    def_id2 = block2.definition_locator.definition_id
    self.assertNotEqual(def_id1, def_id2)
    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)
    for child_key in lc_block.children:
        child = modulestore().get_item(child_key)
        def_id = child.definition_locator.definition_id
        self.assertIn(def_id, (def_id1, def_id2))
