aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-11-22 16:54:55 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-11-22 16:54:55 -0800
commitbae899ad36bcb99dbec94aaf026ef1650f2b1242 (patch)
treee81941130005701cee0139d57f53b817224fefd2 /tests/hazmat
parente247d0be584c52e25694918ad2345dadde3fefa9 (diff)
downloadcryptography-bae899ad36bcb99dbec94aaf026ef1650f2b1242.tar.gz
cryptography-bae899ad36bcb99dbec94aaf026ef1650f2b1242.tar.bz2
cryptography-bae899ad36bcb99dbec94aaf026ef1650f2b1242.zip
Change teh exception
Diffstat (limited to 'tests/hazmat')
-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 4c756203..ea40127e 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, IncorrectPadding
-)
+from cryptography.exceptions import UnsupportedAlgorithm, AlreadyFinalized
from cryptography.hazmat.primitives import interfaces
from cryptography.hazmat.primitives.ciphers import (
Cipher, algorithms, modes
@@ -119,10 +117,10 @@ class TestCipherContext(object):
)
encryptor = cipher.encryptor()
encryptor.update(b"1")
- with pytest.raises(IncorrectPadding):
+ with pytest.raises(ValueError):
encryptor.finalize()
decryptor = cipher.decryptor()
decryptor.update(b"1")
- with pytest.raises(IncorrectPadding):
+ with pytest.raises(ValueError):
decryptor.finalize()