aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat
diff options
context:
space:
mode:
authorJulian Krause <julian.krause@gmail.com>2013-12-26 21:47:39 -0800
committerJulian Krause <julian.krause@gmail.com>2013-12-26 21:47:39 -0800
commitb808f8cc91e302d4120eefa80c946a7cdcf9a155 (patch)
treee68b282dfff5ac7cebcdebe27ce82345fe22fbcb /tests/hazmat
parent831467cce6c2a2b916e30914635924042b15ed2d (diff)
downloadcryptography-b808f8cc91e302d4120eefa80c946a7cdcf9a155.tar.gz
cryptography-b808f8cc91e302d4120eefa80c946a7cdcf9a155.tar.bz2
cryptography-b808f8cc91e302d4120eefa80c946a7cdcf9a155.zip
Remove verify from Hash.
Diffstat (limited to 'tests/hazmat')
-rw-r--r--tests/hazmat/primitives/test_hashes.py27
1 files changed, 1 insertions, 26 deletions
diff --git a/tests/hazmat/primitives/test_hashes.py b/tests/hazmat/primitives/test_hashes.py
index 69d0773a..45faaab2 100644
--- a/tests/hazmat/primitives/test_hashes.py
+++ b/tests/hazmat/primitives/test_hashes.py
@@ -20,9 +20,7 @@ import pytest
import six
from cryptography import utils
-from cryptography.exceptions import (
- AlreadyFinalized, UnsupportedAlgorithm, InvalidSignature
-)
+from cryptography.exceptions import AlreadyFinalized, UnsupportedAlgorithm
from cryptography.hazmat.primitives import hashes, interfaces
from .utils import generate_base_hash_test
@@ -66,29 +64,6 @@ class TestHashContext(object):
with pytest.raises(AlreadyFinalized):
h.finalize()
- def test_verify(self, backend):
- h = hashes.Hash(hashes.SHA1(), backend=backend)
- digest = h.finalize()
-
- h = hashes.Hash(hashes.SHA1(), backend=backend)
- h.verify(digest)
-
- with pytest.raises(AlreadyFinalized):
- h.verify(b'')
-
- def test_invalid_verify(self, backend):
- h = hashes.Hash(hashes.SHA1(), backend=backend)
- with pytest.raises(InvalidSignature):
- h.verify(b'')
-
- with pytest.raises(AlreadyFinalized):
- h.verify(b'')
-
- def test_verify_reject_unicode(self, backend):
- h = hashes.Hash(hashes.SHA1(), backend=backend)
- with pytest.raises(TypeError):
- h.verify(six.u(''))
-
def test_unsupported_hash(self, backend):
with pytest.raises(UnsupportedAlgorithm):
hashes.Hash(UnsupportedDummyHash(), backend)