def test_help_completion(qtmodeltester, monkeypatch, stubs, key_config_stub):
 module = 'qutebrowser.completion.models.miscmodels'
 key_config_stub.set_bindings_for('normal', {'s': 'stop', 'rr': 'roll'})
 _patch_cmdutils(monkeypatch, stubs, (module + '.cmdutils'))
 _patch_configdata(monkeypatch, stubs, (module + '.configdata.DATA'))
 model = miscmodels.HelpCompletionModel()
 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'), (':hide', '', '')], 'Settings': [('general->time', 'Is an illusion.', ''), ('general->volume', 'Goes to 11', ''), ('ui->gesture', 'Waggle your hands to control qutebrowser', ''), ('ui->mind', 'Enable mind-control ui (experimental)', ''), ('ui->voice', 'Whether to respond to voice commands', ''), ('searchengines->DEFAULT', '', '')]})

def test_help_completion ( qtmodeltester , monkeypatch , stubs , key_config_stub ) : module = 'qutebrowser.completion.models.miscmodels' key_config_stub . set_bindings_for ( 'normal' , { 's' : 'stop' , 'rr' : 'roll' } ) _patch_cmdutils ( monkeypatch , stubs , ( module + '.cmdutils' ) ) _patch_configdata ( monkeypatch , stubs , ( module + '.configdata.DATA' ) ) model = miscmodels . HelpCompletionModel ( ) 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' ) , ( ':hide' , '' , '' ) ] , 'Settings' : [ ( 'general->time' , 'Is an illusion.' , '' ) , ( 'general->volume' , 'Goes to 11' , '' ) , ( 'ui->gesture' , 'Waggle your hands to control qutebrowser' , '' ) , ( 'ui->mind' , 'Enable mind-control ui (experimental)' , '' ) , ( 'ui->voice' , 'Whether to respond to voice commands' , '' ) , ( 'searchengines->DEFAULT' , '' , '' ) ] } )
test the results of command completion .