aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-05-01 18:34:25 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-05-01 20:29:56 -0500
commit262e0051ce6d51ab4937f8da99e850d9e403572a (patch)
tree465162cd2b9c8cabc1a4459b31e488ef84c45dee /tests
parentdc0077b4d7fa8cdeb685e688c1b7f331e8bcde0d (diff)
downloadcryptography-262e0051ce6d51ab4937f8da99e850d9e403572a.tar.gz
cryptography-262e0051ce6d51ab4937f8da99e850d9e403572a.tar.bz2
cryptography-262e0051ce6d51ab4937f8da99e850d9e403572a.zip
add test to cover missed line
Diffstat (limited to 'tests')
-rw-r--r--tests/hazmat/primitives/test_dsa.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_dsa.py b/tests/hazmat/primitives/test_dsa.py
index 1bfea2e3..cbe10e9c 100644
--- a/tests/hazmat/primitives/test_dsa.py
+++ b/tests/hazmat/primitives/test_dsa.py
@@ -851,6 +851,15 @@ class TestDSASignature(object):
with pytest.raises(AlreadyFinalized):
signer.update(b"more data")
+ def test_dsa_signer_invalid_backend(self, backend):
+ pretend_backend = object()
+ params = dsa.DSAParameters.generate(1024, backend)
+ private_key = dsa.DSAPrivateKey.generate(params, backend)
+
+ with raises_unsupported_algorithm(
+ _Reasons.BACKEND_MISSING_INTERFACE):
+ private_key.signer(hashes.SHA1(), pretend_backend)
+
def test_dsa_generate_invalid_backend():
pretend_backend = object()