summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Spacek <pspacek@redhat.com>2014-01-21 15:21:08 +0100
committerPetr Spacek <pspacek@redhat.com>2014-01-21 15:28:46 +0100
commitda2bc3296a4f5f87397255230a4b6a76747745ef (patch)
treef698f0f2fc2a62378aba41b6c9f97399f601c498
parent04c88f405266ab515d9916f99740c78a5909fd22 (diff)
downloaddnspython-da2bc3296a4f5f87397255230a4b6a76747745ef.tar.gz
Skip DNSSEC ECDSA tests if there is no python ecdsa package.
-rw-r--r--tests/dnssec.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/dnssec.py b/tests/dnssec.py
index f1d3b52..edb028b 100644
--- a/tests/dnssec.py
+++ b/tests/dnssec.py
@@ -177,20 +177,28 @@ class DNSSECValidatorTestCase(unittest.TestCase):
ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256')
self.failUnless(ds == example_ds_sha256)
+ @unittest.skipIf(not dns.dnssec._have_ecdsa,
+ "python ECDSA can not be imported")
def testAbsoluteECDSA256Good(self):
dns.dnssec.validate(abs_ecdsa256_soa, abs_ecdsa256_soa_rrsig,
abs_ecdsa256_keys, None, when3)
+ @unittest.skipIf(not dns.dnssec._have_ecdsa,
+ "python ECDSA can not be imported")
def testAbsoluteECDSA256Bad(self):
def bad():
dns.dnssec.validate(abs_other_ecdsa256_soa, abs_ecdsa256_soa_rrsig,
abs_ecdsa256_keys, None, when3)
self.failUnlessRaises(dns.dnssec.ValidationFailure, bad)
+ @unittest.skipIf(not dns.dnssec._have_ecdsa,
+ "python ECDSA can not be imported")
def testAbsoluteECDSA384Good(self):
dns.dnssec.validate(abs_ecdsa384_soa, abs_ecdsa384_soa_rrsig,
abs_ecdsa384_keys, None, when4)
+ @unittest.skipIf(not dns.dnssec._have_ecdsa,
+ "python ECDSA can not be imported")
def testAbsoluteECDSA384Bad(self):
def bad():
dns.dnssec.validate(abs_other_ecdsa384_soa, abs_ecdsa384_soa_rrsig,