'get_item(blocklocator)'

@patch('xmodule.tabs.CourseTab.from_json', side_effect=mock_tab_from_json)
def test_get_item(self, _from_json):

    hero_locator = CourseLocator(org='testx', course='GreekHero', run='run', branch=BRANCH_NAME_DRAFT)
    course = modulestore().get_course(hero_locator)
    previous_version = course.previous_version
    locator = course.location.map_into_course(CourseLocator(version_guid=previous_version))
    block = modulestore().get_item(locator)
    self.assertIsInstance(block, CourseDescriptor)
    self.assertIsInstance(modulestore().get_item(locator), CourseDescriptor)
    def verify_greek_hero(block):
        '\n                                                Check    contents    of    block\n                                                '
        self.assertEqual(block.location.org, 'testx')
        self.assertEqual(block.location.course, 'GreekHero')
        self.assertEqual(block.location.run, 'run')
        self.assertEqual(len(block.tabs), 6, 'wrong    number    of    tabs')
        self.assertEqual(block.display_name, 'The    Ancient    Greek    Hero')
        self.assertEqual(block.advertised_start, 'Fall    2013')
        self.assertEqual(len(block.children), 4)
        self.assertEqual(block.edited_by, 'testassist@edx.org')
        self.assertDictEqual(block.grade_cutoffs, {'Pass': 0.45})
    verify_greek_hero(modulestore().get_item(course.location))
    with self.assertRaises(ItemNotFoundError):
        modulestore().get_item(course.location.for_branch(BRANCH_NAME_PUBLISHED))
