From 262e0051ce6d51ab4937f8da99e850d9e403572a Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 1 May 2014 18:34:25 -0500 Subject: add test to cover missed line --- tests/hazmat/primitives/test_dsa.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/hazmat/primitives/test_dsa.py') 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() -- cgit v1.2.3