From 7a12134795205b563b71fbfb5dd78986c8a7e8aa Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Thu, 12 Dec 2019 09:45:08 +0300 Subject: [PATCH] Test that no gossip is sent in 1-to-1 chat --- python/tests/test_account.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/tests/test_account.py b/python/tests/test_account.py index 777c8b72a..141b02bcc 100644 --- a/python/tests/test_account.py +++ b/python/tests/test_account.py @@ -715,6 +715,12 @@ class TestOnlineAccount: assert msg_back.text == "message-back" assert msg_back.is_encrypted() + # Test that we do not gossip peer keys in 1-to-1 chat, + # as it makes no sense to gossip to peers their own keys. + # Gossip is only sent in encrypted messages, + # and we sent encrypted msg_back right above. + assert chat2b.get_summary()["gossiped_timestamp"] == 0 + lp.sec("create group chat with two members, one of which has no encrypt state") chat = ac1.create_group_chat("encryption test") chat.add_contact(ac1.create_contact(ac2.get_config("addr")))