Add tests
This commit is contained in:
parent
d8794bb35e
commit
9912ead516
3 changed files with 12 additions and 3 deletions
11
tests/test_mail.py
Normal file
11
tests/test_mail.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
import pytest
|
||||
from stacosys.service import mailer
|
||||
|
||||
def test_configure_and_check():
|
||||
mailer.configure_smtp("localhost", 2525, "admin", "admin")
|
||||
mailer.configure_destination("admin@mydomain.com")
|
||||
with pytest.raises(ConnectionRefusedError):
|
||||
mailer.check()
|
||||
Loading…
Add table
Add a link
Reference in a new issue