You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
stacosys/tests/test_mail.py

14 lines
317 B
Python

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