add Message.mark_seen shortcut

This commit is contained in:
holger krekel
2020-04-13 17:39:31 +02:00
parent 33dd747ec7
commit 36b50436d7
3 changed files with 6 additions and 2 deletions
+4
View File
@@ -276,6 +276,10 @@ class Message(object):
""" return True if it's a file message. """
return self._view_type == const.DC_MSG_FILE
def mark_seen(self):
""" mark this message as seen. """
self.account.mark_seen_messages([self.id])
# some code for handling DC_MSG_* view types
+1 -1
View File
@@ -805,7 +805,7 @@ class TestOnlineAccount:
lp.sec("check that a second call to mark_seen does not create change or smtp job")
ac2._evtracker.consume_events()
ac2.mark_seen_messages([msg_in])
msg_in.mark_seen()
try:
ac2._evtracker.get_matching("DC_EVENT_MSG_READ", timeout=0.01)
except queue.Empty:
+1 -1
View File
@@ -8,7 +8,7 @@ envlist =
[testenv]
commands =
pytest -n6 --reruns 2 --reruns-delay 5 -v -rsXx --ignored {posargs: tests examples}
# python tests/package_wheels.py {toxworkdir}/wheelhouse
python tests/package_wheels.py {toxworkdir}/wheelhouse
passenv =
TRAVIS
DCC_RS_DEV