Skip to content
Snippets Groups Projects
Verified Commit 82f93cb0 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

TST: skip send_mail test

parent 798639d0
No related branches found
No related tags found
1 merge request!22Release 0.3
......@@ -14,6 +14,3 @@ ssl_insecure=True
timeout=500
[Container]
debug=0
[Misc]
sendmail=/usr/local/bin/sendmail_to_file
......@@ -115,5 +115,4 @@ unittest:
stage: unittest
image: $CI_REGISTRY_IMAGE
script:
- cp .docker/pycaosdb.ini .
- tox
from os.path import abspath, dirname, join, isfile, exists
from os import listdir, remove
from email import message_from_file, policy
from caosdb import configure_connection, RecordType
from pytest import mark
from caosdb import configure_connection, RecordType, get_config
from caosdb.connection.mockup import (MockUpServerConnection, MockUpResponse)
from caosadvancedtools.serverside.helper import (parse_arguments, get_data,
init_data_model, send_mail)
......@@ -60,6 +61,9 @@ def test_init_data_model():
assert rt.id == 1234
@mark.skipif("Misc" not in get_config() or
"sendmail" not in get_config()["Misc"],
reason="sendmail client not defined")
def test_send_mail():
assert len(get_tmp_mails()) == 0
send_mail("me@example.com", "you@example.com", "the subject", "hello!")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment