mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 08:16:32 +03:00
Lint
This commit is contained in:
@@ -38,7 +38,7 @@ class Account(object):
|
||||
# initialize per-account plugin system
|
||||
self._pm = hookspec.PerAccount._make_plugin_manager()
|
||||
self._logging = logging
|
||||
self.logid=logid
|
||||
self.logid = logid
|
||||
|
||||
self.add_account_plugin(self)
|
||||
|
||||
|
||||
@@ -80,12 +80,12 @@ class ImapConn():
|
||||
def __del__(self):
|
||||
try:
|
||||
self.connection.close()
|
||||
except:
|
||||
pass
|
||||
except Exception:
|
||||
print("Could not close direct_imap conn")
|
||||
try:
|
||||
self.connection.logout()
|
||||
except:
|
||||
pass
|
||||
except Exception:
|
||||
print("Could not logout direct_imap conn")
|
||||
|
||||
|
||||
def make_direct_imap(account, folder):
|
||||
@@ -94,9 +94,11 @@ def make_direct_imap(account, folder):
|
||||
imap = ImapConn(folder, conn_info=conn_info)
|
||||
return imap
|
||||
|
||||
|
||||
def print_imap_structure(database, dir="."):
|
||||
print_imap_structure_ac(Account(database), dir)
|
||||
|
||||
|
||||
def print_imap_structure_ac(ac, dir="."):
|
||||
acinfo = ac.logid + "-" + ac.get_config("addr")
|
||||
print("================= ACCOUNT", acinfo, "=================")
|
||||
|
||||
@@ -17,8 +17,6 @@ from .capi import lib
|
||||
from .events import FFIEventLogger, FFIEventTracker
|
||||
from _pytest._code import Source
|
||||
|
||||
from .direct_imap import ImapConn
|
||||
|
||||
import deltachat
|
||||
|
||||
|
||||
|
||||
@@ -647,7 +647,7 @@ class TestOnlineAccount:
|
||||
ac2.start_io()
|
||||
|
||||
imap2 = make_direct_imap(ac2, direct_imap.MVBOX)
|
||||
#imap2.mark_all_read()
|
||||
# imap2.mark_all_read()
|
||||
assert imap2.get_unread_cnt() == 0
|
||||
|
||||
chat = self.get_chat(ac1, ac2)
|
||||
@@ -679,8 +679,6 @@ class TestOnlineAccount:
|
||||
time.sleep(1) # We might need to wait because Imaplib is slower than DC-Core
|
||||
assert imap2.get_unread_cnt() == 0
|
||||
|
||||
#print_imap_structure(ac1.db_path)
|
||||
|
||||
def test_mark_bcc_read_on_server(self, acfactory, lp):
|
||||
ac1 = acfactory.get_online_configuring_account(mvbox=True, move=True)
|
||||
ac2 = acfactory.get_online_configuring_account()
|
||||
@@ -691,7 +689,7 @@ class TestOnlineAccount:
|
||||
ac2.start_io()
|
||||
|
||||
imap1 = make_direct_imap(ac1, direct_imap.MVBOX)
|
||||
#imap1.mark_all_read()
|
||||
# imap1.mark_all_read()
|
||||
assert imap1.get_unread_cnt() == 0
|
||||
|
||||
chat = self.get_chat(ac1, ac2)
|
||||
@@ -712,8 +710,6 @@ class TestOnlineAccount:
|
||||
break
|
||||
time.sleep(1) # We might need to wait because Imaplib is slower than DC-Core
|
||||
|
||||
#print_imap_structure(ac1.db_path)
|
||||
|
||||
assert imap1.get_unread_cnt() == 0
|
||||
|
||||
def test_send_file_twice_unicode_filename_mangling(self, tmpdir, acfactory, lp):
|
||||
|
||||
Reference in New Issue
Block a user