diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2017-07-06 23:43:47 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-07-06 22:43:47 -0500 |
commit | e466bc917e070e34208a52838a0e21730345a78f (patch) | |
tree | 94c21611c168de9cca388fe2bab6542b56c8f567 /tests | |
parent | b3460c6a9a45a016d1ab65c149c606fa3f07096d (diff) | |
download | pyopenssl-git-e466bc917e070e34208a52838a0e21730345a78f.tar.gz |
FIxed #266 -- attempt to deflake our tests (#660)
* FIxed #266 -- attempt to deflake our tests
* typo
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_crypto.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_crypto.py b/tests/test_crypto.py index 4b99bd9..04970fa 100644 --- a/tests/test_crypto.py +++ b/tests/test_crypto.py @@ -22,6 +22,8 @@ from cryptography.hazmat.backends.openssl.backend import backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa +import flaky + from OpenSSL.crypto import TYPE_RSA, TYPE_DSA, Error, PKey, PKeyType from OpenSSL.crypto import X509, X509Type, X509Name, X509NameType from OpenSSL.crypto import ( @@ -1626,7 +1628,7 @@ WpOdIpB8KksUTCzV591Nr1wd not_before = datetime.strptime( cert.get_notBefore().decode(), "%Y%m%d%H%M%SZ" ) - not_before_max = datetime.utcnow() + timedelta(seconds=100) + not_before_max = datetime.utcnow() + timedelta(seconds=101) assert not_before_min <= not_before <= not_before_max def test_gmtime_adj_notAfter_wrong_args(self): @@ -3215,6 +3217,9 @@ class TestCRL(object): b'Issuer: /C=US/ST=IL/L=Chicago/O=Testing/CN=Testing Root CA' ) + # Flaky because we compare the output of running commands which sometimes + # varies by 1 second + @flaky.flaky def test_export_text(self): """ If passed ``FILETYPE_TEXT`` for the format, ``CRL.export`` returns a |