'Test that when we move an item to new parent and then discard the original parent, the item should be present
back in original parent.'

@ddt.data(ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.split)
def test_move_revert(self, store_type):

    self.initdb(store_type)
    self._create_block_hierarchy()
    self.course = self.store.publish(self.course.location, self.user_id)
    item_location = self.problem_x1a_1
    new_parent_location = self.vertical_y1a
    old_parent_location = self.vertical_x1a
    updated_item_location = self.store.update_item_parent(item_location, new_parent_location, old_parent_location, self.user_id)
    self.assertEqual(updated_item_location, item_location)
    self.verify_item_parent(item_location=item_location, expected_parent_location=new_parent_location, old_parent_location=old_parent_location)
    self.store.revert_to_published(old_parent_location, self.user_id)
    self.verify_item_parent(item_location=item_location, expected_parent_location=old_parent_location, old_parent_location=new_parent_location, is_reverted=True)
