stacosys/tests/test_mail.py
2024-04-12 21:35:15 +02:00

14 lines
348 B
Python

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import pytest
from stacosys.service.mail import Mailer
def test_configure_and_check():
mailer = Mailer()
mailer.configure_smtp("localhost", 2525, "admin", "admin")
mailer.configure_destination("admin@mydomain.com")
with pytest.raises(ConnectionRefusedError):
mailer.check()