mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
15 lines
467 B
Python
15 lines
467 B
Python
from unittest.mock import MagicMock
|
|
|
|
from services.entities.mail_entities import InnerMailMessage
|
|
from services.inner_mail_service import InnerMailService
|
|
|
|
|
|
def test_inner_mail_service_delegates_to_dispatcher() -> None:
|
|
dispatch = MagicMock()
|
|
service = InnerMailService(dispatch=dispatch)
|
|
message = InnerMailMessage(recipients=("one@example.com",), subject="Subject", body="Body")
|
|
|
|
service.send(message)
|
|
|
|
dispatch.assert_called_once_with(message)
|