MCPcopy Create free account
hub / github.com/chatmail/core / test_echo_quit_plugin

Function test_echo_quit_plugin

python/examples/test_examples.py:18–36  ·  view source on GitHub ↗
(acfactory, lp)

Source from the content-addressed store, hash-verified

16
17@pytest.mark.skip("The test is flaky in CI and crashes the interpreter as of 2025-11-12")
18def test_echo_quit_plugin(acfactory, lp):
19 lp.sec("creating one echo_and_quit bot")
20 botproc = acfactory.run_bot_process(echo_and_quit)
21
22 lp.sec("creating a temp account to contact the bot")
23 (ac1,) = acfactory.get_online_accounts(1)
24
25 lp.sec("sending a message to the bot")
26 bot_chat = ac1.qr_setup_contact(botproc.qr)
27 ac1._evtracker.wait_securejoin_joiner_progress(1000)
28 bot_chat.send_text("hello")
29
30 lp.sec("waiting for the reply message from the bot to arrive")
31 reply = ac1._evtracker.wait_next_incoming_message()
32 assert reply.chat == bot_chat
33 assert "hello" in reply.text
34 lp.sec("send quit sequence")
35 bot_chat.send_text("/quit")
36 botproc.wait()

Callers

nothing calls this directly

Calls 8

secMethod · 0.80
run_bot_processMethod · 0.80
qr_setup_contactMethod · 0.80
get_online_accountsMethod · 0.45
send_textMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected