diff options
author | David Reid <dreid@dreid.org> | 2014-01-28 15:20:41 -0800 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2014-02-03 10:05:27 -0800 |
commit | e03a289ee46347a4765ff486d58f0c04f56af21b (patch) | |
tree | 7a2229aa7dc5f7501332796a200f5412dd785dc4 /tests/hazmat/primitives | |
parent | 98c182f81bf37c800bb7140c207ecbd71e1982a6 (diff) | |
download | cryptography-e03a289ee46347a4765ff486d58f0c04f56af21b.tar.gz cryptography-e03a289ee46347a4765ff486d58f0c04f56af21b.tar.bz2 cryptography-e03a289ee46347a4765ff486d58f0c04f56af21b.zip |
Use six.u for great good.
Diffstat (limited to 'tests/hazmat/primitives')
-rw-r--r-- | tests/hazmat/primitives/test_hkdf.py | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/tests/hazmat/primitives/test_hkdf.py b/tests/hazmat/primitives/test_hkdf.py index 028a08af..171cf552 100644 --- a/tests/hazmat/primitives/test_hkdf.py +++ b/tests/hazmat/primitives/test_hkdf.py @@ -13,6 +13,8 @@ from __future__ import absolute_import, division, print_function +import six + import pytest from cryptography import exceptions @@ -86,10 +88,22 @@ class TestHKDF(object): def test_unicode_typeerror(self, backend): with pytest.raises(TypeError): - HKDF(hashes.SHA256(), 16, salt=u"foo", info=None, backend=backend) + HKDF( + hashes.SHA256(), + 16, + salt=six.u("foo"), + info=None, + backend=backend + ) with pytest.raises(TypeError): - HKDF(hashes.SHA256(), 16, salt=None, info=u"foo", backend=backend) + HKDF( + hashes.SHA256(), + 16, + salt=None, + info=six.u("foo"), + backend=backend + ) with pytest.raises(TypeError): hkdf = HKDF( @@ -100,7 +114,7 @@ class TestHKDF(object): backend=backend ) - hkdf.derive(u"foo") + hkdf.derive(six.u("foo")) with pytest.raises(TypeError): hkdf = HKDF( @@ -111,7 +125,7 @@ class TestHKDF(object): backend=backend ) - hkdf.verify(u"foo", b"bar") + hkdf.verify(six.u("foo"), b"bar") with pytest.raises(TypeError): hkdf = HKDF( @@ -122,4 +136,4 @@ class TestHKDF(object): backend=backend ) - hkdf.verify(b"foo", u"bar") + hkdf.verify(b"foo", six.u("bar")) |