mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-04 10:19:16 +02:00
Appeased the Python linter
This commit is contained in:
parent
0f1c019bdd
commit
a10ba8c41b
2 changed files with 7 additions and 7 deletions
|
@ -131,7 +131,8 @@ def wait_successful_IMAP_SMTP_connection(account):
|
||||||
smtp_ok = True
|
smtp_ok = True
|
||||||
print("** IMAP and SMTP logins successful", account)
|
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")
|
ev = account._evlogger.get_matching("DC_EVENT_MSGS_CHANGED")
|
||||||
assert ev[1] == chat_id
|
assert ev[1] == chat_id
|
||||||
if msg_id is not None:
|
if msg_id is not None:
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import pytest
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from filecmp import cmp
|
from filecmp import cmp
|
||||||
from deltachat import const
|
from deltachat import const
|
||||||
#from datetime import datetime, timedelta
|
from conftest import wait_configuration_progress, wait_msgs_changed
|
||||||
from conftest import wait_configuration_progress, wait_successful_IMAP_SMTP_connection, wait_msgs_changed
|
|
||||||
|
|
||||||
class TestInCreation:
|
class TestInCreation:
|
||||||
def test_forward_increation(self, acfactory, data, lp):
|
def test_forward_increation(self, acfactory, data, lp):
|
||||||
|
@ -16,10 +15,10 @@ class TestInCreation:
|
||||||
|
|
||||||
blobdir = ac1.get_blobdir()
|
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)
|
chat = ac1.create_chat_by_contact(c2)
|
||||||
assert chat.id >= const.DC_CHAT_ID_LAST_SPECIAL
|
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")
|
lp.sec("create a message with a file in creation")
|
||||||
path = os.path.join(blobdir, "d.png")
|
path = os.path.join(blobdir, "d.png")
|
||||||
|
@ -30,7 +29,7 @@ class TestInCreation:
|
||||||
lp.sec("forward the message while still in creation")
|
lp.sec("forward the message while still in creation")
|
||||||
chat2 = ac1.create_group_chat("newgroup")
|
chat2 = ac1.create_group_chat("newgroup")
|
||||||
chat2.add_contact(c2)
|
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)
|
ac1.forward_messages([prepared_original], chat2)
|
||||||
forwarded_id = wait_msgs_changed(ac1, chat2.id)
|
forwarded_id = wait_msgs_changed(ac1, chat2.id)
|
||||||
forwarded_msg = ac1.get_message_by_id(forwarded_id)
|
forwarded_msg = ac1.get_message_by_id(forwarded_id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue