aboutsummaryrefslogtreecommitdiffstats
path: root/tests/primitives/test_hashes.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-10-21 21:42:00 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-10-21 21:42:00 -0700
commit7b3c1b96d0fb37aaedf93d226a16389b78612f8c (patch)
treee63609d0d2b75c0e26d5b8cac539bff5c53f79d6 /tests/primitives/test_hashes.py
parentf988a9ebc594bf1e5c996164befe69f1225dd564 (diff)
parente524d73d76d63c6399a55cd80cec53cf39c98659 (diff)
downloadcryptography-7b3c1b96d0fb37aaedf93d226a16389b78612f8c.tar.gz
cryptography-7b3c1b96d0fb37aaedf93d226a16389b78612f8c.tar.bz2
cryptography-7b3c1b96d0fb37aaedf93d226a16389b78612f8c.zip
Merge branch 'master' into triple-des
Diffstat (limited to 'tests/primitives/test_hashes.py')
-rw-r--r--tests/primitives/test_hashes.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/primitives/test_hashes.py b/tests/primitives/test_hashes.py
index 901ddabb..805d992b 100644
--- a/tests/primitives/test_hashes.py
+++ b/tests/primitives/test_hashes.py
@@ -13,11 +13,22 @@
from __future__ import absolute_import, division, print_function
+import pytest
+
+import six
+
from cryptography.primitives import hashes
from .utils import generate_base_hash_test
+class TestBaseHash(object):
+ def test_base_hash_reject_unicode(self, api):
+ m = hashes.SHA1(api=api)
+ with pytest.raises(TypeError):
+ m.update(six.u("\u00FC"))
+
+
class TestSHA1(object):
test_SHA1 = generate_base_hash_test(
hashes.SHA1,