diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-05-02 21:23:40 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-05-02 21:23:40 -0400 |
commit | fdec095ab21e523e8de7d46d07c55c94a11960e7 (patch) | |
tree | be67c2d3f02de2fbb540a2241f47083d743c4106 /tests/test_x509_ext.py | |
parent | 43ffcc267c8d7e35f58db4d8d7262de2bcf5db70 (diff) | |
parent | f24bad7ee68fe0a10756f428d3bc742c53e22efa (diff) | |
download | cryptography-fdec095ab21e523e8de7d46d07c55c94a11960e7.tar.gz cryptography-fdec095ab21e523e8de7d46d07c55c94a11960e7.tar.bz2 cryptography-fdec095ab21e523e8de7d46d07c55c94a11960e7.zip |
Merge pull request #1890 from reaperhulk/add-eq-ne-eku
add eq/ne to ExtendedKeyUsage
Diffstat (limited to 'tests/test_x509_ext.py')
-rw-r--r-- | tests/test_x509_ext.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py index c1d51e5e..05734b42 100644 --- a/tests/test_x509_ext.py +++ b/tests/test_x509_ext.py @@ -325,6 +325,21 @@ class TestExtendedKeyUsage(object): "tAuth)>])>" ) + def test_eq(self): + eku = x509.ExtendedKeyUsage([ + x509.ObjectIdentifier("1.3.6"), x509.ObjectIdentifier("1.3.7") + ]) + eku2 = x509.ExtendedKeyUsage([ + x509.ObjectIdentifier("1.3.6"), x509.ObjectIdentifier("1.3.7") + ]) + assert eku == eku2 + + def test_ne(self): + eku = x509.ExtendedKeyUsage([x509.ObjectIdentifier("1.3.6")]) + eku2 = x509.ExtendedKeyUsage([x509.ObjectIdentifier("1.3.6.1")]) + assert eku != eku2 + assert eku != object() + @pytest.mark.requires_backend_interface(interface=RSABackend) @pytest.mark.requires_backend_interface(interface=X509Backend) |