Change test to avoid calling private functions
This commit is contained in:
parent
35597a7c01
commit
c28d681736
@ -303,12 +303,11 @@ def test_quickcomplete_flicker(status_command_stub, completer_obj,
|
||||
config_stub.val.completion.quick = True
|
||||
|
||||
_set_cmd_prompt(status_command_stub, ':open |')
|
||||
completer_obj.schedule_completion_update()
|
||||
assert completion_widget_stub.set_model.called
|
||||
completion_widget_stub.set_model.reset_mock()
|
||||
|
||||
url = 'http://example.com'
|
||||
completer_obj._change_completed_part = unittest.mock.Mock()
|
||||
completer_obj.on_selection_changed(url)
|
||||
|
||||
# no immediate (default is false)
|
||||
completer_obj._change_completed_part.assert_called_with(url, # text
|
||||
['open'], # before
|
||||
[]) # after
|
||||
# selecting a completion should not re-set the model
|
||||
completer_obj.on_selection_changed('http://example.com')
|
||||
completer_obj.schedule_completion_update()
|
||||
assert not completion_widget_stub.set_model.called
|
||||
|
Loading…
Reference in New Issue
Block a user