tests: Use Unicode literals in the Unicode decoding tests.

This is needed because the function returns Unicode strings and the
comparison will fail under python2 unless Unicode literals are used.
python/unicode_decode_errors
Damir Jelić 2019-06-20 13:38:35 +02:00
parent c4d703ac3d
commit 28350d612e
3 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@ class TestClass(object):
plaintext, _ = inbound.decrypt(text)
print(plaintext)
assert plaintext == "<EFBFBD>"
assert plaintext == u"<EFBFBD>"
plaintext, _ = inbound.decrypt(text, "ignore")
assert plaintext == ""

View File

@ -64,4 +64,4 @@ class TestClass(object):
encryption = PkEncryption(decryption.public_key)
message = encryption.encrypt(bytes([0xed]))
plaintext = decryption.decrypt(message)
assert plaintext == "<EFBFBD>"
assert plaintext == u"<EFBFBD>"

View File

@ -151,4 +151,4 @@ class TestClass(object):
bob_session = InboundSession(bob, message)
plaintext = bob_session.decrypt(message)
assert plaintext == "<EFBFBD>"
assert plaintext == u"<EFBFBD>"