'test updating an item\'s definition: ensure it gets versioned as well as the course getting versioned'

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

    locator = BlockUsageLocator(CourseLocator(org='testx', course='GreekHero', run='run', branch=BRANCH_NAME_DRAFT), 'course', 'head12345')
    block = modulestore().get_item(locator)
    pre_def_id = block.definition_locator.definition_id
    pre_version_guid = block.location.version_guid
    block.grading_policy['GRADER'][0]['min_count'] = 13
    block.save()
    updated_block = modulestore().update_item(block, self.user_id)
    self.assertNotEqual(updated_block.definition_locator.definition_id, pre_def_id)
    self.assertNotEqual(updated_block.location.version_guid, pre_version_guid)
    self.assertEqual(updated_block.grading_policy['GRADER'][0]['min_count'], 13)
