mirror of
https://github.com/chatmail/core.git
synced 2026-05-04 05:46:29 +03:00
test: extend test_qr_join_chat to check that the group is not verified
This commit is contained in:
@@ -9,7 +9,7 @@ import pytest
|
|||||||
from imap_tools import AND, U
|
from imap_tools import AND, U
|
||||||
|
|
||||||
import deltachat as dc
|
import deltachat as dc
|
||||||
from deltachat import account_hookimpl, Message
|
from deltachat import account_hookimpl, Message, Chat
|
||||||
from deltachat.tracker import ImexTracker
|
from deltachat.tracker import ImexTracker
|
||||||
|
|
||||||
|
|
||||||
@@ -1669,8 +1669,12 @@ def test_qr_setup_contact(acfactory, lp):
|
|||||||
ac1._evtracker.wait_securejoin_inviter_progress(1000)
|
ac1._evtracker.wait_securejoin_inviter_progress(1000)
|
||||||
|
|
||||||
|
|
||||||
def test_qr_join_chat(acfactory, lp):
|
@pytest.mark.parametrize("verified_one_on_one_chats", [0, 1])
|
||||||
|
def test_qr_join_chat(acfactory, lp, verified_one_on_one_chats):
|
||||||
ac1, ac2 = acfactory.get_online_accounts(2)
|
ac1, ac2 = acfactory.get_online_accounts(2)
|
||||||
|
ac1.set_config("verified_one_on_one_chats", verified_one_on_one_chats)
|
||||||
|
ac2.set_config("verified_one_on_one_chats", verified_one_on_one_chats)
|
||||||
|
|
||||||
lp.sec("ac1: create QR code and let ac2 scan it, starting the securejoin")
|
lp.sec("ac1: create QR code and let ac2 scan it, starting the securejoin")
|
||||||
chat = ac1.create_group_chat("hello")
|
chat = ac1.create_group_chat("hello")
|
||||||
qr = chat.get_join_qr()
|
qr = chat.get_join_qr()
|
||||||
@@ -1683,6 +1687,17 @@ def test_qr_join_chat(acfactory, lp):
|
|||||||
ac2._evtracker.get_matching("DC_EVENT_IMAP_MESSAGE_DELETED")
|
ac2._evtracker.get_matching("DC_EVENT_IMAP_MESSAGE_DELETED")
|
||||||
ac1._evtracker.wait_securejoin_inviter_progress(1000)
|
ac1._evtracker.wait_securejoin_inviter_progress(1000)
|
||||||
|
|
||||||
|
msg = ac2._evtracker.wait_next_incoming_message()
|
||||||
|
assert msg.text == "Member Me ({}) added by {}.".format(ac2.get_config("addr"), ac1.get_config("addr"))
|
||||||
|
|
||||||
|
# ac1 reloads the chat.
|
||||||
|
chat = Chat(chat.account, chat.id)
|
||||||
|
assert not chat.is_protected()
|
||||||
|
|
||||||
|
# ac2 reloads the chat.
|
||||||
|
ch = Chat(ch.account, ch.id)
|
||||||
|
assert not ch.is_protected()
|
||||||
|
|
||||||
|
|
||||||
def test_qr_email_capitalization(acfactory, lp):
|
def test_qr_email_capitalization(acfactory, lp):
|
||||||
"""Regression test for a bug
|
"""Regression test for a bug
|
||||||
|
|||||||
Reference in New Issue
Block a user