예제 #1
0
def test_setting_dict_option_completion(qtmodeltester, config_stub,
                                        configdata_stub, info):
    model = configmodel.dict_option(info=info)
    model.set_pattern('')
    qtmodeltester.check(model)

    _check_completions(model, {
        "Dict options": [
            ('aliases', 'Aliases for commands.', '{"q": "quit"}'),
            ('bindings.commands', 'Default keybindings', (
                '{"normal": {"<Ctrl+q>": "quit", "I": "invalid", '
                '"ZQ": "quit", "d": "scroll down"}}')),
            ('url.searchengines', 'searchengines list',
             '{"DEFAULT": "https://duckduckgo.com/?q={}", '
             '"google": "https://google.com/?q={}"}'),
        ]
    })
예제 #2
0
def test_setting_dict_option_completion(qtmodeltester, config_stub,
                                        configdata_stub, info):
    model = configmodel.dict_option(info=info)
    model.set_pattern('')
    qtmodeltester.check(model)

    _check_completions(model, {
        "Dict options": [
            ('aliases', 'Aliases for commands.', '{"q": "quit"}'),
            ('bindings.commands', 'Custom keybindings', (
                '{"normal": {"<Ctrl+q>": "quit", "I": "invalid", '
                '"ZQ": "quit", "d": "scroll down"}}')),
            ('url.searchengines', 'searchengines list',
             '{"DEFAULT": "https://duckduckgo.com/?q={}", '
             '"google": "https://google.com/?q={}"}'),
        ]
    })