1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-04 02:09:17 +02:00

Appeased the Python linter

This commit is contained in:
VP- 2019-02-25 11:59:18 +01:00
parent 0f1c019bdd
commit a10ba8c41b
2 changed files with 7 additions and 7 deletions

View file

@ -131,7 +131,8 @@ def wait_successful_IMAP_SMTP_connection(account):
smtp_ok = True
print("** IMAP and SMTP logins successful", account)
def wait_msgs_changed(account, chat_id, msg_id = None):
def wait_msgs_changed(account, chat_id, msg_id=None):
ev = account._evlogger.get_matching("DC_EVENT_MSGS_CHANGED")
assert ev[1] == chat_id
if msg_id is not None:

View file

@ -1,11 +1,10 @@
from __future__ import print_function
import pytest
import os
import shutil
from filecmp import cmp
from deltachat import const
#from datetime import datetime, timedelta
from conftest import wait_configuration_progress, wait_successful_IMAP_SMTP_connection, wait_msgs_changed
from conftest import wait_configuration_progress, wait_msgs_changed
class TestInCreation:
def test_forward_increation(self, acfactory, data, lp):
@ -16,10 +15,10 @@ class TestInCreation:
blobdir = ac1.get_blobdir()
c2 = ac1.create_contact(email = ac2.get_config("addr"))
c2 = ac1.create_contact(email=ac2.get_config("addr"))
chat = ac1.create_chat_by_contact(c2)
assert chat.id >= const.DC_CHAT_ID_LAST_SPECIAL
wait_msgs_changed(ac1, 0, 0) # why no chat id?
wait_msgs_changed(ac1, 0, 0) # why no chat id?
lp.sec("create a message with a file in creation")
path = os.path.join(blobdir, "d.png")
@ -30,7 +29,7 @@ class TestInCreation:
lp.sec("forward the message while still in creation")
chat2 = ac1.create_group_chat("newgroup")
chat2.add_contact(c2)
wait_msgs_changed(ac1, 0, 0) # why not chat id?
wait_msgs_changed(ac1, 0, 0) # why not chat id?
ac1.forward_messages([prepared_original], chat2)
forwarded_id = wait_msgs_changed(ac1, chat2.id)
forwarded_msg = ac1.get_message_by_id(forwarded_id)