mirror of
https://github.com/chatmail/relay.git
synced 2026-10-15 02:14:17 +00:00
Compare commits
1
Commits
fix-get-addr
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
305d83fff3 |
@@ -91,7 +91,7 @@ def test_concurrent_logins_same_account(
|
|||||||
|
|
||||||
def test_no_vrfy(cmfactory, chatmail_config, maildomain):
|
def test_no_vrfy(cmfactory, chatmail_config, maildomain):
|
||||||
ac = cmfactory.get_online_account()
|
ac = cmfactory.get_online_account()
|
||||||
addr = ac.get_config("addr")
|
addr = ac.list_transports()[0]["addr"]
|
||||||
|
|
||||||
s = smtplib.SMTP(maildomain)
|
s = smtplib.SMTP(maildomain)
|
||||||
s.starttls()
|
s.starttls()
|
||||||
|
|||||||
@@ -133,8 +133,8 @@ def test_use_two_chatmailservers(cmfactory, maildomain2):
|
|||||||
ac1 = cmfactory.get_online_account()
|
ac1 = cmfactory.get_online_account()
|
||||||
ac2 = cmfactory.get_online_account(domain=maildomain2)
|
ac2 = cmfactory.get_online_account(domain=maildomain2)
|
||||||
cmfactory.get_accepted_chat(ac1, ac2)
|
cmfactory.get_accepted_chat(ac1, ac2)
|
||||||
domain1 = ac1.get_config("addr").split("@")[1]
|
domain1 = ac1.list_transports()[0]["addr"].split("@")[1]
|
||||||
domain2 = ac2.get_config("addr").split("@")[1]
|
domain2 = ac2.list_transports()[0]["addr"].split("@")[1]
|
||||||
assert domain1 != domain2
|
assert domain1 != domain2
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,10 @@ from cmdeploy.remote import rshell
|
|||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def imap_mailbox(cmfactory, ssl_context):
|
def imap_mailbox(cmfactory, ssl_context):
|
||||||
(ac1,) = cmfactory.get_online_accounts(1)
|
(ac1,) = cmfactory.get_online_accounts(1)
|
||||||
user = ac1.get_config("addr")
|
# Delta Chat 2.63 stopped writing the legacy addr and mail_pw config keys.
|
||||||
password = ac1.get_config("mail_pw")
|
transport = ac1.list_transports()[0]
|
||||||
|
user = transport["addr"]
|
||||||
|
password = transport["password"]
|
||||||
host = user.split("@")[1].strip("[").strip("]")
|
host = user.split("@")[1].strip("[").strip("]")
|
||||||
mailbox = imap_tools.MailBox(host, ssl_context=ssl_context)
|
mailbox = imap_tools.MailBox(host, ssl_context=ssl_context)
|
||||||
mailbox.login(user, password)
|
mailbox.login(user, password)
|
||||||
@@ -88,7 +90,7 @@ class TestEndToEndDeltaChat:
|
|||||||
ac1, ac2 = cmfactory.get_online_accounts(2)
|
ac1, ac2 = cmfactory.get_online_accounts(2)
|
||||||
chat = cmfactory.get_accepted_chat(ac1, ac2)
|
chat = cmfactory.get_accepted_chat(ac1, ac2)
|
||||||
|
|
||||||
user = ac2.get_config("configured_addr")
|
user = ac2.list_transports()[0]["addr"]
|
||||||
|
|
||||||
def parse_size_limit(limit: str) -> int:
|
def parse_size_limit(limit: str) -> int:
|
||||||
"""Parse a size limit and return the number of bytes as integer.
|
"""Parse a size limit and return the number of bytes as integer.
|
||||||
@@ -190,9 +192,10 @@ def test_hide_senders_ip_address(cmfactory, ssl_context):
|
|||||||
|
|
||||||
chat.send_text("testing submission header cleanup")
|
chat.send_text("testing submission header cleanup")
|
||||||
user2.wait_for_incoming_msg()
|
user2.wait_for_incoming_msg()
|
||||||
addr = user2.get_config("addr")
|
transport = user2.list_transports()[0]
|
||||||
|
addr = transport["addr"]
|
||||||
host = addr.split("@")[1].strip("[").strip("]")
|
host = addr.split("@")[1].strip("[").strip("]")
|
||||||
pw = user2.get_config("mail_pw")
|
pw = transport["password"]
|
||||||
mailbox = imap_tools.MailBox(host, ssl_context=ssl_context)
|
mailbox = imap_tools.MailBox(host, ssl_context=ssl_context)
|
||||||
mailbox.login(addr, pw)
|
mailbox.login(addr, pw)
|
||||||
msgs = list(mailbox.fetch(mark_seen=False))
|
msgs = list(mailbox.fetch(mark_seen=False))
|
||||||
|
|||||||
Reference in New Issue
Block a user