From 0e2a39da2a6dd2f349eba595ea8765599bff626d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 6 Mar 2018 07:39:41 +0100 Subject: [PATCH] Fix tests for keyboard parsing change --- tests/end2end/features/keyinput.feature | 2 +- tests/unit/completion/test_models.py | 2 +- tests/unit/config/test_configcommands.py | 4 ++-- tests/unit/config/test_configfiles.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/end2end/features/keyinput.feature b/tests/end2end/features/keyinput.feature index 1337a48d3..226891259 100644 --- a/tests/end2end/features/keyinput.feature +++ b/tests/end2end/features/keyinput.feature @@ -53,7 +53,7 @@ Feature: Keyboard input Scenario: :fake-key with an unparsable key When I run :fake-key - Then the error "Could not parse '': Got unknown key!" should be shown + Then the error "Could not parse '': Got invalid key!" should be shown Scenario: :fake-key sending key to the website When I open data/keyinput/log.html diff --git a/tests/unit/completion/test_models.py b/tests/unit/completion/test_models.py index 86f9ddf93..5240f2813 100644 --- a/tests/unit/completion/test_models.py +++ b/tests/unit/completion/test_models.py @@ -775,7 +775,7 @@ def test_bind_completion_invalid_binding(cmdutils_stub, config_stub, _check_completions(model, { "Current/Default": [ - ('', "Could not parse '': Got unknown key!", ''), + ('', "Could not parse '': Got invalid key!", ''), ], "Commands": [ ('open', 'open a url', ''), diff --git a/tests/unit/config/test_configcommands.py b/tests/unit/config/test_configcommands.py index a74b446d1..4a09b5be2 100644 --- a/tests/unit/config/test_configcommands.py +++ b/tests/unit/config/test_configcommands.py @@ -559,7 +559,7 @@ class TestBind: "Can't find binding 'foobar' in normal mode"), # :bind nop ('bind', ['', 'nop'], {}, - "Could not parse '': Got unknown key!"), + "Could not parse '': 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 ('unbind', [''], {}, - "Could not parse '': Got unknown key!"), + "Could not parse '': Got invalid key!"), ]) def test_bind_invalid(self, commands, command, args, kwargs, expected): diff --git a/tests/unit/config/test_configfiles.py b/tests/unit/config/test_configfiles.py index 37b565374..186b3cd55 100644 --- a/tests/unit/config/test_configfiles.py +++ b/tests/unit/config/test_configfiles.py @@ -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):