diff options
author | Petr Spacek <pspacek@redhat.com> | 2014-01-21 15:21:08 +0100 |
---|---|---|
committer | Petr Spacek <pspacek@redhat.com> | 2014-01-21 15:28:46 +0100 |
commit | da2bc3296a4f5f87397255230a4b6a76747745ef (patch) | |
tree | f698f0f2fc2a62378aba41b6c9f97399f601c498 | |
parent | 04c88f405266ab515d9916f99740c78a5909fd22 (diff) | |
download | dnspython-da2bc3296a4f5f87397255230a4b6a76747745ef.tar.gz |
Skip DNSSEC ECDSA tests if there is no python ecdsa package.
-rw-r--r-- | tests/dnssec.py | 8 |
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, |