# Why cannot I override the context for bpy.ops.object.origin_set()

I ran the following code to reset the origin of Cube:

import bpy
# set selection
bpy.data.objects["Cube"].select = False
bpy.data.objects["Plane"].select = True

# override context
override = bpy.context.copy()
override["selected_bases"] = [bpy.data.scenes[0].object_bases["Cube"]]
override["active_base"] = bpy.data.scenes[0].object_bases["Cube"]

bpy.ops.object.origin_set(override)  # works on Plane
bpy.ops.transform.translate(override, value=(1,1,1))  # works on Cube


However this resets the origin of the Plane instead. What am I doing wrong ?

operator origin_set relies on selected_editable_objects afaict, so adding override["selected_editable_objects"] = [bpy.data.objects["Cube"]] should do the trick:
• Good to know. Thought wait a minute I tried that one unsuccessfully before commenting, on further investigation "selected_editalbe_objects" – batFINGER Nov 3 '18 at 2:16