Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @pytest.mark.asynico
- async def test_handle_DATA(mocker):
- handle_mock = mocker.MagicMock()
- envelope_mock = mocker.MagicMock(mail_from="Test@From", rcpt_tos=["Test@To"], content=b"TestContent")
- result = SendToDictHandler.handle_DATA(handle_mock, "TestServer", "TestSession", envelope_mock)
- assert result == "250 Message accepted for delivery"
- assert email_core.testing_emails_dict == {
- "Test@To": {
- "from": "Test@From",
- "to": ["Test@To"],
- "msg": "TestContent",
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement