Creating driver keys

I want to create drivers using python, but I got stuck half way there. I can create driver, add input, set object driving animation but I can’t figure how to add keys to driven animation curve. This is what I’ve got:


As you can see, everything looks fine, except for the graph. So I’ve tried adding keys like this:

bpy.data.objects['Cube'].animation_data.drivers[6].keyframe_points.insert(0,0)
bpy.data.objects['Cube'].animation_data.drivers[6].keyframe_points.insert(1,1)

I get no errors, it seems that keyframes are added, but they don’t appear in the graph window. I think I’m missing some crucial step along the way.
I’m thinking, is there a way to check what is inside bpy.ops.anim.driver_button_add command?