diff options
author | Aleksander Machniak <machniak@kolabsys.com> | 2018-06-20 11:10:03 +0000 |
---|---|---|
committer | Aleksander Machniak <machniak@kolabsys.com> | 2018-06-20 11:10:03 +0000 |
commit | 90d2d23b4c21cf9b39582add9c8a6de9d91c3a15 (patch) | |
tree | 54bd225892ebbdf704b174175d2f6380067da87c | |
parent | 5ec8788dd436b342f160ad3dfcca634e68e65112 (diff) | |
download | pykolab-90d2d23b4c21cf9b39582add9c8a6de9d91c3a15.tar.gz |
Fix unit tests on a system with no smtp service
-rw-r--r-- | tests/unit/test-011-wallace_resources.py | 1 | ||||
-rw-r--r-- | tests/unit/test-012-wallace_invitationpolicy.py | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/unit/test-011-wallace_resources.py b/tests/unit/test-011-wallace_resources.py index 01ef0d1..73fba5d 100644 --- a/tests/unit/test-011-wallace_resources.py +++ b/tests/unit/test-011-wallace_resources.py @@ -109,6 +109,7 @@ class TestWallaceResources(unittest.TestCase): import smtplib self.patch(smtplib.SMTP, "__init__", self._mock_smtp_init) self.patch(smtplib.SMTP, "quit", self._mock_nop) + self.patch(smtplib.SMTP, "connect", self._mock_nop) self.patch(smtplib.SMTP, "sendmail", self._mock_smtp_sendmail) self.smtplog = [] diff --git a/tests/unit/test-012-wallace_invitationpolicy.py b/tests/unit/test-012-wallace_invitationpolicy.py index 2ed8709..2bec175 100644 --- a/tests/unit/test-012-wallace_invitationpolicy.py +++ b/tests/unit/test-012-wallace_invitationpolicy.py @@ -85,6 +85,7 @@ class TestWallaceInvitationpolicy(unittest.TestCase): import smtplib self.patch(smtplib.SMTP, "__init__", self._mock_smtp_init) self.patch(smtplib.SMTP, "quit", self._mock_nop) + self.patch(smtplib.SMTP, "connect", self._mock_nop) self.patch(smtplib.SMTP, "sendmail", self._mock_smtp_sendmail) self.smtplog = [] |