diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-09-13 08:29:19 +0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2017-09-12 20:29:19 -0400 |
commit | e00bad5332f3ba851823270bee8e191ac0fc4ec2 (patch) | |
tree | 6a9d6a1b1473d89f048bb91ac4e0baf1e272965e /tests/x509/test_x509_ext.py | |
parent | c7ecb4568444bec5a1db02e9db1ad386a7afc88d (diff) | |
download | cryptography-e00bad5332f3ba851823270bee8e191ac0fc4ec2.tar.gz cryptography-e00bad5332f3ba851823270bee8e191ac0fc4ec2.tar.bz2 cryptography-e00bad5332f3ba851823270bee8e191ac0fc4ec2.zip |
compare against bytes values, not the U-label decoded ones (#3906)
We need to add one small test to cover a case that is no longer covered
with this switch.
Diffstat (limited to 'tests/x509/test_x509_ext.py')
-rw-r--r-- | tests/x509/test_x509_ext.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/x509/test_x509_ext.py b/tests/x509/test_x509_ext.py index 5b9fb347..830283bb 100644 --- a/tests/x509/test_x509_ext.py +++ b/tests/x509/test_x509_ext.py @@ -1669,6 +1669,11 @@ class TestUniformResourceIdentifier(object): b"gopher://xn--80ato2c.cryptography:70/some/path" ) + def test_empty_string(self): + gn = x509.UniformResourceIdentifier(b"") + with pytest.warns(utils.DeprecatedIn21): + assert gn.value == u"" + def test_query_and_fragment(self): gn = x509.UniformResourceIdentifier( b"ldap://cryptography:90/path?query=true#somedata" |