def test_command_completion(qtmodeltester, monkeypatch, stubs, config_stub, key_config_stub):
 _patch_cmdutils(monkeypatch, stubs, 'qutebrowser.completion.models.miscmodels.cmdutils')
 config_stub.data['aliases'] = {'rock': 'roll'}
 key_config_stub.set_bindings_for('normal', {'s': 'stop', 'rr': 'roll', 'ro': 'rock'})
 model = miscmodels.CommandCompletionModel()
 qtmodeltester.data_display_may_return_none = True
 qtmodeltester.check(model)
 _check_completions(model, {'Commands': [('stop', 'stop qutebrowser', 's'), ('drop', 'drop all user data', ''), ('roll', 'never gonna give you up', 'rr'), ('rock', "Alias for 'roll'", 'ro')]})

def test_command_completion ( qtmodeltester , monkeypatch , stubs , config_stub , key_config_stub ) : _patch_cmdutils ( monkeypatch , stubs , 'qutebrowser.completion.models.miscmodels.cmdutils' ) config_stub . data [ 'aliases' ] = { 'rock' : 'roll' } key_config_stub . set_bindings_for ( 'normal' , { 's' : 'stop' , 'rr' : 'roll' , 'ro' : 'rock' } ) model = miscmodels . CommandCompletionModel ( ) qtmodeltester . data_display_may_return_none = True qtmodeltester . check ( model ) _check_completions ( model , { 'Commands' : [ ( 'stop' , 'stop qutebrowser' , 's' ) , ( 'drop' , 'drop all user data' , '' ) , ( 'roll' , 'never gonna give you up' , 'rr' ) , ( 'rock' , "Alias for 'roll'" , 'ro' ) ] } )
test the results of command completion .