Skip to content
Snippets Groups Projects
Commit 779b3817 authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

TST: Skip sendmail test on Windows

parent f54451c8
No related branches found
No related tags found
2 merge requests!128MNT: Added a warning when column metadata is not configured, and a better...,!124Fix unit tests on Windows
...@@ -2,7 +2,7 @@ import subprocess ...@@ -2,7 +2,7 @@ import subprocess
from email import message_from_file, policy from email import message_from_file, policy
from os import listdir, remove from os import listdir, remove
from os.path import abspath, dirname, exists, isfile, join from os.path import abspath, dirname, exists, isfile, join
import platform
import linkahead as db import linkahead as db
from caosadvancedtools.serverside.helper import (NameCollector, get_data, from caosadvancedtools.serverside.helper import (NameCollector, get_data,
get_file_via_download, get_file_via_download,
...@@ -85,7 +85,8 @@ def test_send_mail(): ...@@ -85,7 +85,8 @@ def test_send_mail():
assert msg["Subject"] == "the subject" assert msg["Subject"] == "the subject"
assert msg.get_content() == "hello!\n" assert msg.get_content() == "hello!\n"
# skip on windows (has no sendmail)
@mark.skipif(platform.system() == "Windows")
def test_send_mail_error(): def test_send_mail_error():
with raises(subprocess.CalledProcessError): with raises(subprocess.CalledProcessError):
send_mail("me@example.com", "you@example.com", "the subject", "hello!", send_mail("me@example.com", "you@example.com", "the subject", "hello!",
......
...@@ -77,7 +77,7 @@ class ReferencesBaseTest(BaseMockUpTest): ...@@ -77,7 +77,7 @@ class ReferencesBaseTest(BaseMockUpTest):
files = get_referenced_files("test.npy", prefix=None, filename=None, files = get_referenced_files("test.npy", prefix=None, filename=None,
location=None) location=None)
self.assertEqual(len(files), 1) self.assertEqual(len(files), 1)
self.assertEqual(os.path.join(files[0].path, "some", "path", "test.npy")) self.assertEqual(files[0].path, "/some/path/test.npy")
log = self.get_log() log = self.get_log()
assert "FIND file which" in log assert "FIND file which" in log
assert "does not allow a search" not in log assert "does not allow a search" not in log
......
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