From c16c5e0802bb7a3d6a3b02c38632a643570b05ee Mon Sep 17 00:00:00 2001 From: iequidoo Date: Tue, 16 Jan 2024 14:19:20 -0300 Subject: [PATCH] test: Bring test_forward_encrypted_to_unencrypted into line with current API Currently `Chat.send_msg()` modifies the source message and returns another message object equivalent to the source one. That's how it works in the core and thus in Python bindings too. --- python/tests/test_1_online.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/tests/test_1_online.py b/python/tests/test_1_online.py index 09449e1cd..c25270164 100644 --- a/python/tests/test_1_online.py +++ b/python/tests/test_1_online.py @@ -511,9 +511,11 @@ def test_forward_encrypted_to_unencrypted(acfactory, lp): lp.sec("ac2: forward message to ac3 unencrypted ") unencrypted_chat = ac2.create_chat(ac3) + msg_id = msg.id msg2 = unencrypted_chat.send_msg(msg) - assert not msg2.is_encrypted() - assert msg.is_encrypted() + assert msg2 == msg + assert msg.id != msg_id + assert not msg.is_encrypted() def test_forward_own_message(acfactory, lp):