From 3c34096392ca81d7ce498a7b96cd374748e121c7 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sun, 22 Mar 2020 17:21:31 +0100 Subject: [PATCH] add a failing test that crashes when sending a message to a self-only group with bcc_self enabled --- python/tests/test_account.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/python/tests/test_account.py b/python/tests/test_account.py index 71c8322d3..31835b152 100644 --- a/python/tests/test_account.py +++ b/python/tests/test_account.py @@ -76,6 +76,20 @@ class TestOfflineAccountBasic: with pytest.raises(KeyError): ac1.get_config("123123") + def test_empty_group_bcc_self_enabled(self, acfactory): + ac1 = acfactory.get_configured_offline_account() + ac1.set_config("bcc_self", "1") + chat = ac1.create_group_chat(name="group1") + msg = chat.send_text("msg1") + assert msg in chat.get_messages() + + def test_empty_group_bcc_self_disabled(self, acfactory): + ac1 = acfactory.get_configured_offline_account() + ac1.set_config("bcc_self", "0") + chat = ac1.create_group_chat(name="group1") + msg = chat.send_text("msg1") + assert msg in chat.get_messages() + class TestOfflineContact: def test_contact_attr(self, acfactory):