(acfactory, lp)
| 16 | |
| 17 | @pytest.mark.skip("The test is flaky in CI and crashes the interpreter as of 2025-11-12") |
| 18 | def 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() |
nothing calls this directly
no test coverage detected