aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_block.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-03-06 19:43:53 -0430
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-03-06 19:43:53 -0430
commit792eef345d138a0d0eff5df923f8218376e78621 (patch)
tree479a7090ede017536fbb5ebb1dfe76ddb1917d7a /tests/hazmat/primitives/test_block.py
parentd932f662d5e2659cb79a6aeb5aa1bdeffa2c067e (diff)
parent2a69b48f6a8e3a287a9fb1fa7728f01bde765a1b (diff)
downloadcryptography-792eef345d138a0d0eff5df923f8218376e78621.tar.gz
cryptography-792eef345d138a0d0eff5df923f8218376e78621.tar.bz2
cryptography-792eef345d138a0d0eff5df923f8218376e78621.zip
Merge pull request #747 from alex/exception-heirarchy-refactor
Try to use more specific exceptions in places.
Diffstat (limited to 'tests/hazmat/primitives/test_block.py')
-rw-r--r--tests/hazmat/primitives/test_block.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/hazmat/primitives/test_block.py b/tests/hazmat/primitives/test_block.py
index f758ffaa..8ff00fd9 100644
--- a/tests/hazmat/primitives/test_block.py
+++ b/tests/hazmat/primitives/test_block.py
@@ -18,9 +18,7 @@ import binascii
import pytest
from cryptography import utils
-from cryptography.exceptions import (
- UnsupportedAlgorithm, AlreadyFinalized,
-)
+from cryptography.exceptions import UnsupportedCipher, AlreadyFinalized
from cryptography.hazmat.primitives import interfaces
from cryptography.hazmat.primitives.ciphers import (
Cipher, algorithms, modes
@@ -116,10 +114,10 @@ class TestCipherContext(object):
cipher = Cipher(
DummyCipher(), mode, backend
)
- with pytest.raises(UnsupportedAlgorithm):
+ with pytest.raises(UnsupportedCipher):
cipher.encryptor()
- with pytest.raises(UnsupportedAlgorithm):
+ with pytest.raises(UnsupportedCipher):
cipher.decryptor()
def test_incorrectly_padded(self, backend):