Fix tests for keyboard parsing change

This commit is contained in:
Florian Bruhin 2018-03-06 07:39:41 +01:00
parent c9cd47b5b1
commit 0e2a39da2a
4 changed files with 5 additions and 5 deletions

View File

@ -53,7 +53,7 @@ Feature: Keyboard input
Scenario: :fake-key with an unparsable key
When I run :fake-key <blub>
Then the error "Could not parse '<blub>': Got unknown key!" should be shown
Then the error "Could not parse '<blub>': Got invalid key!" should be shown
Scenario: :fake-key sending key to the website
When I open data/keyinput/log.html

View File

@ -775,7 +775,7 @@ def test_bind_completion_invalid_binding(cmdutils_stub, config_stub,
_check_completions(model, {
"Current/Default": [
('', "Could not parse '<blub>': Got unknown key!", '<blub>'),
('', "Could not parse '<blub>': Got invalid key!", '<blub>'),
],
"Commands": [
('open', 'open a url', ''),

View File

@ -559,7 +559,7 @@ class TestBind:
"Can't find binding 'foobar' in normal mode"),
# :bind <blub> nop
('bind', ['<blub>', 'nop'], {},
"Could not parse '<blub>': Got unknown key!"),
"Could not parse '<blub>': Got invalid key!"),
# :unbind foobar
('unbind', ['foobar'], {},
"Can't find binding 'foobar' in normal mode"),
@ -568,7 +568,7 @@ class TestBind:
'Invalid mode wrongmode!'),
# :unbind <blub>
('unbind', ['<blub>'], {},
"Could not parse '<blub>': Got unknown key!"),
"Could not parse '<blub>': Got invalid key!"),
])
def test_bind_invalid(self, commands,
command, args, kwargs, expected):

View File

@ -712,7 +712,7 @@ class TestConfigPy:
assert error.text.endswith("and parsing key")
assert isinstance(error.exception, keyutils.KeyParseError)
assert str(error.exception).startswith("Could not parse")
assert str(error.exception).endswith("Got unknown key!")
assert str(error.exception).endswith("Got invalid key!")
@pytest.mark.parametrize('line', ["c.foo = 42", "config.set('foo', 42)"])
def test_config_error(self, confpy, line):