diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-05-30 10:57:41 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-05-30 12:16:28 +0200 |
commit | 996487c43e4fcc265b541f9eca1e7930e3c5cf05 (patch) | |
tree | b0ccee286a4b21459588ef249e7b8557f7bb1a82 /tests | |
parent | 03fa9383833c6262b08a5f7c4930143e39327173 (diff) | |
download | qutebrowser-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.py | 5 |
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'], |