'Test that the mechanics of caching work.'

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

    locator = CourseLocator(org='testx', course='GreekHero', run='run', branch=BRANCH_NAME_DRAFT)
    course = modulestore().get_course(locator)
    block_map = modulestore().cache_items(course.system, [BlockKey.from_usage_key(child) for child in course.children], course.id, depth=3)
    self.assertIn(BlockKey('chapter', 'chapter1'), block_map)
    self.assertIn(BlockKey('problem', 'problem3_2'), block_map)
