From 28350d612e4f2cbb7cdf3187a871a0e9f3c04724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 20 Jun 2019 13:38:35 +0200 Subject: 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/tests/group_session_test.py | 2 +- python/tests/pk_test.py | 2 +- python/tests/session_test.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/tests/group_session_test.py b/python/tests/group_session_test.py index 3942024..b45fbb6 100644 --- a/python/tests/group_session_test.py +++ b/python/tests/group_session_test.py @@ -125,7 +125,7 @@ class TestClass(object): plaintext, _ = inbound.decrypt(text) print(plaintext) - assert plaintext == "�" + assert plaintext == u"�" plaintext, _ = inbound.decrypt(text, "ignore") assert plaintext == "" diff --git a/python/tests/pk_test.py b/python/tests/pk_test.py index 749d2eb..b82f420 100644 --- a/python/tests/pk_test.py +++ b/python/tests/pk_test.py @@ -64,4 +64,4 @@ class TestClass(object): encryption = PkEncryption(decryption.public_key) message = encryption.encrypt(bytes([0xed])) plaintext = decryption.decrypt(message) - assert plaintext == "�" + assert plaintext == u"�" diff --git a/python/tests/session_test.py b/python/tests/session_test.py index 56a6b83..dce37c5 100644 --- a/python/tests/session_test.py +++ b/python/tests/session_test.py @@ -151,4 +151,4 @@ class TestClass(object): bob_session = InboundSession(bob, message) plaintext = bob_session.decrypt(message) - assert plaintext == "�" + assert plaintext == u"�" -- cgit v1.2.3