mirror of
https://github.com/chatmail/core.git
synced 2026-05-12 19:36:32 +03:00
if you order webxdc-announcements it seems to pass the test
This commit is contained in:
@@ -50,19 +50,22 @@ def test_basic_iroh_jsonrpc(acfactory, path_to_webxdc):
|
|||||||
ac1._rpc.send_webxdc_realtime_advertisement(ac1.id, ac1_webxdc_msg.id)
|
ac1._rpc.send_webxdc_realtime_advertisement(ac1.id, ac1_webxdc_msg.id)
|
||||||
log("sending additinal messdage ac1 -> ac2")
|
log("sending additinal messdage ac1 -> ac2")
|
||||||
acfactory.send_message(from_account=ac1, to_account=ac2, text="ping1")
|
acfactory.send_message(from_account=ac1, to_account=ac2, text="ping1")
|
||||||
|
|
||||||
|
log("waiting for incoming message on ac2")
|
||||||
|
snapshot = ac2.get_message_by_id(ac2.wait_for_incoming_msg_event().msg_id).get_snapshot()
|
||||||
|
assert snapshot.text == "ping1"
|
||||||
|
|
||||||
log("sending ac2 -> ac1 realtime advertisement")
|
log("sending ac2 -> ac1 realtime advertisement")
|
||||||
ac2._rpc.send_webxdc_realtime_advertisement(ac2.id, ac2_webxdc_msg.id)
|
ac2._rpc.send_webxdc_realtime_advertisement(ac2.id, ac2_webxdc_msg.id)
|
||||||
log("sending additinal messdage ac2 -> ac1")
|
log("sending additinal messdage ac2 -> ac1")
|
||||||
acfactory.send_message(from_account=ac2, to_account=ac1, text="ping2")
|
acfactory.send_message(from_account=ac2, to_account=ac1, text="ping2")
|
||||||
log("waiting for incoming message on ac2")
|
|
||||||
snapshot = ac2.get_message_by_id(ac2.wait_for_incoming_msg_event().msg_id).get_snapshot()
|
|
||||||
assert snapshot.text == "ping1"
|
|
||||||
log("waiting for incoming message on ac1")
|
log("waiting for incoming message on ac1")
|
||||||
snapshot = ac1.get_message_by_id(ac1.wait_for_incoming_msg_event().msg_id).get_snapshot()
|
snapshot = ac1.get_message_by_id(ac1.wait_for_incoming_msg_event().msg_id).get_snapshot()
|
||||||
assert snapshot.text == "ping2"
|
assert snapshot.text == "ping2"
|
||||||
|
|
||||||
log("sending realtime data ac1 -> ac2")
|
log("sending realtime data ac1 -> ac2")
|
||||||
ac1._rpc.send_webxdc_realtime_data(ac1.id, ac1_webxdc_msg.id, [13, 15, 17])
|
ac1._rpc.send_webxdc_realtime_data(ac1.id, ac1_webxdc_msg.id, [13, 15, 17])
|
||||||
|
|
||||||
log("ac2: waiting for realtime data")
|
log("ac2: waiting for realtime data")
|
||||||
while 1:
|
while 1:
|
||||||
event = ac2.wait_for_event()
|
event = ac2.wait_for_event()
|
||||||
|
|||||||
Reference in New Issue
Block a user