'Test create_item w/ specifying the parent of the new item'

def test_create_parented_item(self):

    locator = BlockUsageLocator(CourseLocator(org='testx', course='GreekHero', run='run', branch=BRANCH_NAME_DRAFT), 'chapter', block_id='chapter2')
    original = modulestore().get_item(locator)
    locator = BlockUsageLocator(CourseLocator(org='testx', course='wonderful', run='run', branch=BRANCH_NAME_DRAFT), 'course', 'head23456')
    premod_course = modulestore().get_course(locator.course_key)
    category = 'chapter'
    new_module = modulestore().create_child('user123', locator, category, fields={'display_name': 'new    chapter'}, definition_locator=original.definition_locator)
    self.assertNotEqual(new_module.location.version_guid, premod_course.location.version_guid)
    parent = modulestore().get_item(locator)
    self.assertIn(new_module.location.version_agnostic(), version_agnostic(parent.children))
    self.assertEqual(new_module.definition_locator.definition_id, original.definition_locator.definition_id)
