human
I wrote the below code

    callbacks = Mock()
    sqlexecute = Mock()
    def dummy_bg_refresh(*args):
        time.sleep(3)
    refresher._bg_refresh = dummy_bg_refresh
    actual1 = refresher.refresh(sqlexecute, callbacks)
    time.sleep(1)
    assert (len(actual1) == 1)
    assert (len(actual1[0]) == 4)
    assert (actual1[0][3] == 'Auto-completion    refresh    started    in    the    background.')
    actual2 = refresher.refresh(sqlexecute, callbacks)
    time.sleep(1)
    assert (len(actual2) == 1)
    assert (len(actual2[0]) == 4)
    assert (actual2[0][3] == 'Auto-completion    refresh    restarted.')

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def test_refresh_called_twice(refresher):