Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. @pytest.mark.asynico
  2. async def test_handle_DATA(mocker):
  3. handle_mock = mocker.MagicMock()
  4. envelope_mock = mocker.MagicMock(mail_from="Test@From", rcpt_tos=["Test@To"], content=b"TestContent")
  5.  
  6. result = SendToDictHandler.handle_DATA(handle_mock, "TestServer", "TestSession", envelope_mock)
  7.  
  8. assert result == "250 Message accepted for delivery"
  9. assert email_core.testing_emails_dict == {
  10. "Test@To": {
  11. "from": "Test@From",
  12. "to": ["Test@To"],
  13. "msg": "TestContent",
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement