Fix tests that breaks sometimes

If don't call refresh_gui after calling select and before calling send_delete,
the delete event is not emitted when running the whole test suit (it's fine
when running the test alone).

Maybe we should fix refresh_gui someday to be more reliable. A lot of tests on
this module needs workarounds like this.

Change-Id: Ice445d1c3dde4fa8253b0784b74109adada909a1