Fix tests for unicode characters on Python 3.2

This commit is contained in:
Donald Stufft 2013-05-11 00:26:47 -04:00
parent 6c74d9236d
commit 3cb40dbea4

View File

@ -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"))