# Path: aiosmtplib/api.py
# @overload
# async def send(
#     message: Union[email.message.EmailMessage, email.message.Message],
#     sender: Optional[str] = ...,
#     recipients: Optional[Union[str, Sequence[str]]] = ...,
#     hostname: str = ...,
#     port: Optional[int] = ...,
#     username: Optional[Union[str, bytes]] = ...,
#     password: Optional[Union[str, bytes]] = ...,
#     mail_options: Optional[List[str]] = ...,
#     rcpt_options: Optional[List[str]] = ...,
#     timeout: Optional[float] = ...,
#     source_address: Optional[str] = ...,
#     use_tls: bool = ...,
#     start_tls: bool = ...,
#     validate_certs: bool = ...,
#     client_cert: Optional[str] = ...,
#     client_key: Optional[str] = ...,
#     tls_context: None = ...,
#     cert_bundle: Optional[str] = ...,
#     socket_path: None = ...,
#     sock: None = ...,
# ) -> Tuple[Dict[str, SMTPResponse], str]:
#     ...


import pytest
from aiosmtplib import send
"""
send coroutine testing.
"""



pytestmark = pytest.mark.asyncio()


async def test_send(hostname, smtpd_server_port, message, received_messages):

# Path: aiosmtplib/api.py
# @overload
# async def send(
#     message: Union[email.message.EmailMessage, email.message.Message],
#     sender: Optional[str] = ...,
#     recipients: Optional[Union[str, Sequence[str]]] = ...,
#     hostname: str = ...,
#     port: Optional[int] = ...,
#     username: Optional[Union[str, bytes]] = ...,
#     password: Optional[Union[str, bytes]] = ...,
#     mail_options: Optional[List[str]] = ...,
#     rcpt_options: Optional[List[str]] = ...,
#     timeout: Optional[float] = ...,
#     source_address: Optional[str] = ...,
#     use_tls: bool = ...,
#     start_tls: bool = ...,
#     validate_certs: bool = ...,
#     client_cert: Optional[str] = ...,
#     client_key: Optional[str] = ...,
#     tls_context: None = ...,
#     cert_bundle: Optional[str] = ...,
#     socket_path: None = ...,
#     sock: None = ...,
# ) -> Tuple[Dict[str, SMTPResponse], str]:
#     ...


# Path: tests/test_api.py
import pytest
from aiosmtplib import send

"""
send coroutine testing.
"""



pytestmark = pytest.mark.asyncio()


async def test_send(hostname, smtpd_server_port, message, received_messages):

    errors, response = await send(message, hostname=hostname, port=smtpd_server_port)