mirror of https://git.matrix.org/git/olm.git
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
parent
c4d703ac3d
commit
28350d612e
|
@ -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 == ""
|
||||
|
|
|
@ -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>"
|
||||
|
|
|
@ -151,4 +151,4 @@ class TestClass(object):
|
|||
|
||||
bob_session = InboundSession(bob, message)
|
||||
plaintext = bob_session.decrypt(message)
|
||||
assert plaintext == "<EFBFBD>"
|
||||
assert plaintext == u"<EFBFBD>"
|
||||
|
|
Loading…
Reference in New Issue