aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends/test_multibackend.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-01 10:12:53 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-01 10:12:53 -0500
commit550f1739d88e8a40a905797544af21dd83bec477 (patch)
treeeef1cab9a29231664c8c2aa189792bc8ee3dd703 /tests/hazmat/backends/test_multibackend.py
parent476682af2d4a9438026e69b6c1f3500c19f2f200 (diff)
parentdf16f4a573d0d9a81236818c79032f4c12ffec00 (diff)
downloadcryptography-550f1739d88e8a40a905797544af21dd83bec477.tar.gz
cryptography-550f1739d88e8a40a905797544af21dd83bec477.tar.bz2
cryptography-550f1739d88e8a40a905797544af21dd83bec477.zip
Merge pull request #876 from public/unsupported-algorithm-asym-tags
Extra UnsupportedAlgorithm reason tags
Diffstat (limited to 'tests/hazmat/backends/test_multibackend.py')
-rw-r--r--tests/hazmat/backends/test_multibackend.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/hazmat/backends/test_multibackend.py b/tests/hazmat/backends/test_multibackend.py
index b7bcaf69..f0be72b2 100644
--- a/tests/hazmat/backends/test_multibackend.py
+++ b/tests/hazmat/backends/test_multibackend.py
@@ -13,8 +13,6 @@
from __future__ import absolute_import, division, print_function
-import pytest
-
from cryptography import utils
from cryptography.exceptions import (
UnsupportedAlgorithm, _Reasons
@@ -179,13 +177,19 @@ class TestMultiBackend(object):
padding.PKCS1v15(), hashes.MD5())
backend = MultiBackend([])
- with pytest.raises(UnsupportedAlgorithm):
+ with raises_unsupported_algorithm(
+ _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM
+ ):
backend.generate_rsa_private_key(key_size=1024, public_exponent=3)
- with pytest.raises(UnsupportedAlgorithm):
+ with raises_unsupported_algorithm(
+ _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM
+ ):
backend.create_rsa_signature_ctx("private_key", padding.PKCS1v15(),
hashes.MD5())
- with pytest.raises(UnsupportedAlgorithm):
+ with raises_unsupported_algorithm(
+ _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM
+ ):
backend.create_rsa_verification_ctx(
"public_key", "sig", padding.PKCS1v15(), hashes.MD5())