From 3cb40dbea4764bb929d3926f8649b7213bad8b40 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Sat, 11 May 2013 00:26:47 -0400 Subject: [PATCH] Fix tests for unicode characters on Python 3.2 --- tests/test_bcrypt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_bcrypt.py b/tests/test_bcrypt.py index 41f5884..920facf 100644 --- a/tests/test_bcrypt.py +++ b/tests/test_bcrypt.py @@ -109,9 +109,9 @@ def test_hashpw_invalid(): def test_hashpw_str_password(): with pytest.raises(TypeError): - bcrypt.hashpw(u"password", b"$2a$04$cVWp4XaNU8a4v1uMRum2SO") + bcrypt.hashpw(bcrypt.text_type("password"), b"$2a$04$cVWp4XaNU8a4v1uMRum2SO") def test_hashpw_str_salt(): with pytest.raises(TypeError): - bcrypt.hashpw(b"password", u"$2a$04$cVWp4XaNU8a4v1uMRum2SO") + bcrypt.hashpw(b"password", bcrypt.text_type("$2a$04$cVWp4XaNU8a4v1uMRum2SO"))