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 ...@@ -14,6 +14,3 @@ ssl_insecure=True
timeout=500 timeout=500
[Container] [Container]
debug=0 debug=0
[Misc]
sendmail=/usr/local/bin/sendmail_to_file
...@@ -115,5 +115,4 @@ unittest: ...@@ -115,5 +115,4 @@ unittest:
stage: unittest stage: unittest
image: $CI_REGISTRY_IMAGE image: $CI_REGISTRY_IMAGE
script: script:
- cp .docker/pycaosdb.ini .
- tox - tox
from os.path import abspath, dirname, join, isfile, exists from os.path import abspath, dirname, join, isfile, exists
from os import listdir, remove from os import listdir, remove
from email import message_from_file, policy 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 caosdb.connection.mockup import (MockUpServerConnection, MockUpResponse)
from caosadvancedtools.serverside.helper import (parse_arguments, get_data, from caosadvancedtools.serverside.helper import (parse_arguments, get_data,
init_data_model, send_mail) init_data_model, send_mail)
...@@ -60,6 +61,9 @@ def test_init_data_model(): ...@@ -60,6 +61,9 @@ def test_init_data_model():
assert rt.id == 1234 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(): def test_send_mail():
assert len(get_tmp_mails()) == 0 assert len(get_tmp_mails()) == 0
send_mail("me@example.com", "you@example.com", "the subject", "hello!") 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