summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-05-30 10:57:41 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-05-30 12:16:28 +0200
commit996487c43e4fcc265b541f9eca1e7930e3c5cf05 (patch)
treeb0ccee286a4b21459588ef249e7b8557f7bb1a82 /tests
parent03fa9383833c6262b08a5f7c4930143e39327173 (diff)
downloadqutebrowser-996487c43e4fcc265b541f9eca1e7930e3c5cf05.tar.gz
qutebrowser-996487c43e4fcc265b541f9eca1e7930e3c5cf05.zip
Validate encoding for header settings
Also needed to add encoding check support to FormatString.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/config/test_configtypes.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py
index 3e1d15099..66b152937 100644
--- a/tests/unit/config/test_configtypes.py
+++ b/tests/unit/config/test_configtypes.py
@@ -1839,6 +1839,11 @@ class TestFormatString:
with pytest.raises(configexc.ValidationError):
typ.to_py(val)
+ def test_invalid_encoding(self, klass):
+ typ = klass(fields=[], encoding='ascii')
+ with pytest.raises(configexc.ValidationError):
+ typ.to_py('fooƤbar')
+
@pytest.mark.parametrize('value', [
None,
['one', 'two'],