def test_refresh_called_once(refresher):
    callbacks = Mock()
    pgexecute = Mock()
    special = Mock()

    with patch.object(refresher, '_bg_refresh') as bg_refresh:
        actual = refresher.refresh(pgexecute, special, callbacks)
        time.sleep(1)  # Wait for the thread to work.
        assert len(actual) == 1
        assert len(actual[0]) == 4
        assert actual[0][3] == 'Auto-completion refresh started in the background.'
        bg_refresh.assert_called_with(pgexecute, special, callbacks, None)
Predict next position.
dataset/ETHPy150Open dbcli/pgcli/tests/test_completion_refresher.py/test_refresh_called_once--crossover with--dataset/ETHPy150Open rlabbe/filterpy/filterpy/hinfinity/hinfinity_filter.py/HInfinityFilter.predict