1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
"""
Sync method tests.
"""
import email.message
from aiosmtplib import SMTP
def test_sendmail_sync(
smtp_client_threaded: SMTP,
sender_str: str,
recipient_str: str,
message_str: str,
) -> None:
errors, response = smtp_client_threaded.sendmail_sync(
sender_str, [recipient_str], message_str
)
assert not errors
assert isinstance(errors, dict)
assert response != ""
def test_send_message_sync(
smtp_client_threaded: SMTP,
message: email.message.EmailMessage,
) -> None:
errors, response = smtp_client_threaded.send_message_sync(message)
assert not errors
assert isinstance(errors, dict)
assert response != ""
|