From 96e8ceb7c7917531eff33d13059c6df9dff6af91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 18 Jun 2017 20:24:56 +0200 Subject: [PATCH] Skip test_get_smtp_server_extra_parameters on python version < 2.7.4 Older Python version does not parse query for smtp scheme. https://bugs.python.org/issue9374 --- trytond/tests/test_sendmail.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trytond/tests/test_sendmail.py b/trytond/tests/test_sendmail.py index 6c6047fcc9..6445518428 100644 --- a/trytond/tests/test_sendmail.py +++ b/trytond/tests/test_sendmail.py @@ -2,6 +2,7 @@ # this repository contains the full copyright notices and license terms. import unittest import smtplib +import sys from email.message import Message from mock import Mock, patch, call @@ -67,6 +68,7 @@ class SendmailTestCase(unittest.TestCase): SMTP.assert_called_once_with('localhost', 25) server.starttls.assert_called_once_with() + @unittest.skipIf(sys.version_info < (2, 7, 4), "python bug #9374") def test_get_smtp_server_extra_parameters(self): 'Test get_smtp_server uri extra parameters' with patch.object(smtplib, 'SMTP') as SMTP: