From a10ba8c41b29f257259bf901346b7ed85f27a833 Mon Sep 17 00:00:00 2001 From: VP- <898409+VP-@users.noreply.github.com> Date: Mon, 25 Feb 2019 11:59:18 +0100 Subject: [PATCH] Appeased the Python linter --- python/tests/conftest.py | 3 ++- python/tests/test_increation.py | 11 +++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python/tests/conftest.py b/python/tests/conftest.py index 6efeac73..884c1396 100644 --- a/python/tests/conftest.py +++ b/python/tests/conftest.py @@ -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: diff --git a/python/tests/test_increation.py b/python/tests/test_increation.py index 3eca2e27..fce7334a 100644 --- a/python/tests/test_increation.py +++ b/python/tests/test_increation.py @@ -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)