more refines and test fixes

This commit is contained in:
holger krekel
2020-06-08 00:56:32 +02:00
parent 612a9d012c
commit 69135709ac
4 changed files with 32 additions and 33 deletions

View File

@@ -388,15 +388,17 @@ def acfactory(pytestconfig, tmpdir, request, session_liveconfig, data):
imap.dump_imap_structures(tmpdir, logfile=logfile)
imap.shutdown()
def get_chat(self, ac1, ac2):
chat12, chat21 = self.get_chats(ac1, ac2)
def get_chat(self, ac1, ac2, both=True):
chat12, chat21 = self.get_chats(ac1, ac2, both=both)
return chat12
def get_chats(self, ac1, ac2):
def get_chats(self, ac1, ac2, both=True):
chat12 = ac1.create_chat_by_contact(
ac1.create_contact(email=ac2.get_config("addr")))
chat21 = ac2.create_chat_by_contact(
ac2.create_contact(email=ac1.get_config("addr")))
chat21 = None
if both:
chat21 = ac2.create_chat_by_contact(
ac2.create_contact(email=ac1.get_config("addr")))
return chat12, chat21
am = AccountMaker()