summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/unit/test-011-wallace_resources.py3
-rw-r--r--tests/unit/test-012-wallace_invitationpolicy.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/unit/test-011-wallace_resources.py b/tests/unit/test-011-wallace_resources.py
index 73fba5d..35d85a0 100644
--- a/tests/unit/test-011-wallace_resources.py
+++ b/tests/unit/test-011-wallace_resources.py
@@ -109,7 +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, "connect", self._mock_smtp_init)
self.patch(smtplib.SMTP, "sendmail", self._mock_smtp_sendmail)
self.smtplog = []
@@ -140,6 +140,7 @@ class TestWallaceResources(unittest.TestCase):
def _mock_smtp_sendmail(self, from_addr, to_addr, message, mail_options=None, rcpt_options=None):
self.smtplog.append((from_addr, to_addr, message))
+ return []
def _get_ics_part(self, message):
ics_part = None
diff --git a/tests/unit/test-012-wallace_invitationpolicy.py b/tests/unit/test-012-wallace_invitationpolicy.py
index 2bec175..e1adb4f 100644
--- a/tests/unit/test-012-wallace_invitationpolicy.py
+++ b/tests/unit/test-012-wallace_invitationpolicy.py
@@ -85,7 +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, "connect", self._mock_smtp_init)
self.patch(smtplib.SMTP, "sendmail", self._mock_smtp_sendmail)
self.smtplog = []
@@ -109,7 +109,7 @@ class TestWallaceInvitationpolicy(unittest.TestCase):
def _mock_smtp_sendmail(self, from_addr, to_addr, message, mail_options=None, rcpt_options=None):
self.smtplog.append((from_addr, to_addr, message))
- return True
+ return []
def test_001_itip_events_from_message(self):
itips = pykolab.itip.events_from_message(message_from_string(itip_multipart))