mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
fix various location-streaming issue, test passes now
This commit is contained in:
@@ -827,17 +827,20 @@ class TestOnlineAccount:
|
||||
lp.sec("ac1: enable location sending in chat")
|
||||
chat1.enable_sending_locations(seconds=100)
|
||||
assert chat1.is_sending_locations()
|
||||
ac1._evlogger.get_matching("DC_EVENT_SMTP_MESSAGE_SENT")
|
||||
|
||||
lp.sec("ac1: setting location")
|
||||
ac1.set_location(latitude=1.0, longitude=2.0)
|
||||
ac1.set_location(latitude=2.0, longitude=3.0)
|
||||
ac1._evlogger.get_matching("DC_EVENT_LOCATION_CHANGED")
|
||||
chat1.send_text("hello")
|
||||
ac1._evlogger.get_matching("DC_EVENT_SMTP_MESSAGE_SENT")
|
||||
ac1._evlogger.get_matching("DC_EVENT_SMTP_MESSAGE_SENT")
|
||||
|
||||
lp.sec("ac2: wait for incoming location message")
|
||||
ac2._evlogger.get_matching("DC_EVENT_INCOMING_MSG")
|
||||
ac2._evlogger.get_matching("DC_EVENT_INCOMING_MSG")
|
||||
ac2._evlogger.get_matching("DC_EVENT_INCOMING_MSG") # "enabled-location streaming"
|
||||
|
||||
# currently core emits location changed before event_incoming message
|
||||
ac2._evlogger.get_matching("DC_EVENT_LOCATION_CHANGED")
|
||||
ac2._evlogger.get_matching("DC_EVENT_INCOMING_MSG") # text message with location
|
||||
|
||||
# contact = ac2.create_contact(ac1.get_config("addr"))
|
||||
locations = chat2.get_locations() # XXX per contact
|
||||
assert len(locations) >= 1
|
||||
|
||||
Reference in New Issue
Block a user