Skip to content

Commit c16c5e0

Browse files
iequidoomissytake
authored andcommitted
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.
1 parent 36cab40 commit c16c5e0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python/tests/test_1_online.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,11 @@ def test_forward_encrypted_to_unencrypted(acfactory, lp):
511511

512512
lp.sec("ac2: forward message to ac3 unencrypted ")
513513
unencrypted_chat = ac2.create_chat(ac3)
514+
msg_id = msg.id
514515
msg2 = unencrypted_chat.send_msg(msg)
515-
assert not msg2.is_encrypted()
516-
assert msg.is_encrypted()
516+
assert msg2 == msg
517+
assert msg.id != msg_id
518+
assert not msg.is_encrypted()
517519

518520

519521
def test_forward_own_message(acfactory, lp):

0 commit comments

Comments
 (0)