Expect capitalized bindings in test_models

This commit is contained in:
Florian Bruhin 2018-02-27 06:58:39 +01:00
parent 1b0aea5e05
commit fa29a0b686

View File

@ -105,7 +105,7 @@ def configdata_stub(config_stub, monkeypatch, configdata_init):
), ),
default={ default={
'normal': collections.OrderedDict([ 'normal': collections.OrderedDict([
('<ctrl+q>', 'quit'), ('<Ctrl+q>', 'quit'),
('d', 'tab-close'), ('d', 'tab-close'),
]) ])
}, },
@ -123,7 +123,7 @@ def configdata_stub(config_stub, monkeypatch, configdata_init):
), ),
default={ default={
'normal': collections.OrderedDict([ 'normal': collections.OrderedDict([
('<ctrl+q>', 'quit'), ('<Ctrl+q>', 'quit'),
('ZQ', 'quit'), ('ZQ', 'quit'),
('I', 'invalid'), ('I', 'invalid'),
('d', 'scroll down'), ('d', 'scroll down'),
@ -215,7 +215,7 @@ def test_command_completion(qtmodeltester, cmdutils_stub, configdata_stub,
"Commands": [ "Commands": [
('open', 'open a url', ''), ('open', 'open a url', ''),
('q', "Alias for 'quit'", ''), ('q', "Alias for 'quit'", ''),
('quit', 'quit qutebrowser', 'ZQ, <ctrl+q>'), ('quit', 'quit qutebrowser', 'ZQ, <Ctrl+q>'),
('tab-close', 'Close the current tab.', ''), ('tab-close', 'Close the current tab.', ''),
] ]
}) })
@ -240,7 +240,7 @@ def test_help_completion(qtmodeltester, cmdutils_stub, key_config_stub,
_check_completions(model, { _check_completions(model, {
"Commands": [ "Commands": [
(':open', 'open a url', ''), (':open', 'open a url', ''),
(':quit', 'quit qutebrowser', 'ZQ, <ctrl+q>'), (':quit', 'quit qutebrowser', 'ZQ, <Ctrl+q>'),
(':scroll', 'Scroll the current tab in the given direction.', ''), (':scroll', 'Scroll the current tab in the given direction.', ''),
(':tab-close', 'Close the current tab.', ''), (':tab-close', 'Close the current tab.', ''),
], ],
@ -644,10 +644,10 @@ def test_setting_option_completion(qtmodeltester, config_stub,
"Options": [ "Options": [
('aliases', 'Aliases for commands.', '{"q": "quit"}'), ('aliases', 'Aliases for commands.', '{"q": "quit"}'),
('bindings.commands', 'Default keybindings', ( ('bindings.commands', 'Default keybindings', (
'{"normal": {"<ctrl+q>": "quit", "ZQ": "quit", ' '{"normal": {"<Ctrl+q>": "quit", "ZQ": "quit", '
'"I": "invalid", "d": "scroll down"}}')), '"I": "invalid", "d": "scroll down"}}')),
('bindings.default', 'Default keybindings', ('bindings.default', 'Default keybindings',
'{"normal": {"<ctrl+q>": "quit", "d": "tab-close"}}'), '{"normal": {"<Ctrl+q>": "quit", "d": "tab-close"}}'),
] ]
}) })
@ -674,7 +674,7 @@ def test_bind_completion(qtmodeltester, cmdutils_stub, config_stub,
"Commands": [ "Commands": [
('open', 'open a url', ''), ('open', 'open a url', ''),
('q', "Alias for 'quit'", ''), ('q', "Alias for 'quit'", ''),
('quit', 'quit qutebrowser', 'ZQ, <ctrl+q>'), ('quit', 'quit qutebrowser', 'ZQ, <Ctrl+q>'),
('scroll', 'Scroll the current tab in the given direction.', ''), ('scroll', 'Scroll the current tab in the given direction.', ''),
('tab-close', 'Close the current tab.', ''), ('tab-close', 'Close the current tab.', ''),
], ],
@ -694,7 +694,7 @@ def test_bind_completion_invalid(cmdutils_stub, config_stub, key_config_stub,
"Commands": [ "Commands": [
('open', 'open a url', ''), ('open', 'open a url', ''),
('q', "Alias for 'quit'", ''), ('q', "Alias for 'quit'", ''),
('quit', 'quit qutebrowser', 'ZQ, <ctrl+q>'), ('quit', 'quit qutebrowser', 'ZQ, <Ctrl+q>'),
('scroll', 'Scroll the current tab in the given direction.', ''), ('scroll', 'Scroll the current tab in the given direction.', ''),
('tab-close', 'Close the current tab.', ''), ('tab-close', 'Close the current tab.', ''),
], ],
@ -713,7 +713,7 @@ def test_bind_completion_no_binding(qtmodeltester, cmdutils_stub, config_stub,
"Commands": [ "Commands": [
('open', 'open a url', ''), ('open', 'open a url', ''),
('q', "Alias for 'quit'", ''), ('q', "Alias for 'quit'", ''),
('quit', 'quit qutebrowser', 'ZQ, <ctrl+q>'), ('quit', 'quit qutebrowser', 'ZQ, <Ctrl+q>'),
('scroll', 'Scroll the current tab in the given direction.', ''), ('scroll', 'Scroll the current tab in the given direction.', ''),
('tab-close', 'Close the current tab.', ''), ('tab-close', 'Close the current tab.', ''),
], ],
@ -735,7 +735,7 @@ def test_bind_completion_changed(cmdutils_stub, config_stub, key_config_stub,
"Commands": [ "Commands": [
('open', 'open a url', ''), ('open', 'open a url', ''),
('q', "Alias for 'quit'", ''), ('q', "Alias for 'quit'", ''),
('quit', 'quit qutebrowser', 'ZQ, <ctrl+q>'), ('quit', 'quit qutebrowser', 'ZQ, <Ctrl+q>'),
('scroll', 'Scroll the current tab in the given direction.', ''), ('scroll', 'Scroll the current tab in the given direction.', ''),
('tab-close', 'Close the current tab.', ''), ('tab-close', 'Close the current tab.', ''),
], ],