diff options
author | Mathias Ertl <mati@fsinf.at> | 2019-03-25 22:25:49 +0100 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2019-03-25 14:25:49 -0700 |
commit | 91105952739442a74582d3e62b3d2111365b0dc7 (patch) | |
tree | 1d9ee247fcfe24d5ff1456cc1d377bedba2fb08b /tests/x509/test_x509_ext.py | |
parent | 5c037cc8eb800b0da4a6c475cecbdec3b182422b (diff) | |
download | cryptography-91105952739442a74582d3e62b3d2111365b0dc7.tar.gz cryptography-91105952739442a74582d3e62b3d2111365b0dc7.tar.bz2 cryptography-91105952739442a74582d3e62b3d2111365b0dc7.zip |
fix != comparison in py2 (fixes #4821) (#4822)
* fix != comparison in py2 (fixes #4821)
* remove blank line b/c pep8
* move __ne__ next to __eq__ as per review request
Diffstat (limited to 'tests/x509/test_x509_ext.py')
-rw-r--r-- | tests/x509/test_x509_ext.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/x509/test_x509_ext.py b/tests/x509/test_x509_ext.py index fabf4106..ec618d9a 100644 --- a/tests/x509/test_x509_ext.py +++ b/tests/x509/test_x509_ext.py @@ -4404,9 +4404,12 @@ class TestOCSPNoCheckExtension(object): assert hash(onc1) == hash(onc2) def test_ne(self): - onc = x509.OCSPNoCheck() + onc1 = x509.OCSPNoCheck() + onc2 = x509.OCSPNoCheck() - assert onc != object() + assert onc1 == onc2 + assert (onc1 != onc2) is False + assert onc1 != object() def test_repr(self): onc = x509.OCSPNoCheck() @@ -4929,9 +4932,12 @@ class TestPrecertPoisonExtension(object): assert hash(pcp1) == hash(pcp2) def test_ne(self): - pcp = x509.PrecertPoison() + pcp1 = x509.PrecertPoison() + pcp2 = x509.PrecertPoison() - assert pcp != object() + assert pcp1 == pcp2 + assert (pcp1 != pcp2) is False + assert pcp1 != object() def test_repr(self): pcp = x509.PrecertPoison() |