summaryrefslogtreecommitdiff
path: root/service/test/unit
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2015-11-03 16:34:52 +0100
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-11-03 17:13:40 +0100
commit5c3468304f13fa0fe279a6e04fb90432d6737345 (patch)
treed7e1ae9f57ba72328f74033221bf269cf0adbd2f /service/test/unit
parent8da9557f66bcbaa91f540d44f7175a9e2436fa9b (diff)
Rename MailSender to LocalSmtpMailSender
- Issue #499
Diffstat (limited to 'service/test/unit')
-rw-r--r--service/test/unit/adapter/services/test_mail_sender.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/service/test/unit/adapter/services/test_mail_sender.py b/service/test/unit/adapter/services/test_mail_sender.py
index 421a5f6d..7806c92a 100644
--- a/service/test/unit/adapter/services/test_mail_sender.py
+++ b/service/test/unit/adapter/services/test_mail_sender.py
@@ -16,14 +16,14 @@
from twisted.trial import unittest
from mockito import mock, when, verify, any, unstub
-from pixelated.adapter.services.mail_sender import MailSender, SMTPDownException
+from pixelated.adapter.services.mail_sender import LocalSmtpMailSender, SMTPDownException
from pixelated.adapter.model.mail import InputMail
from test.support.test_helper import mail_dict
from twisted.internet import reactor
from twisted.internet.defer import Deferred
-class MailSenderTest(unittest.TestCase):
+class LocalSmtpMailSenderTest(unittest.TestCase):
def setUp(self):
self.smtp = mock()
self.smtp.local_smtp_port_number = 4650
@@ -32,7 +32,7 @@ class MailSenderTest(unittest.TestCase):
def test_sendmail(self):
when(reactor).connectTCP('localhost', 4650, any()).thenReturn(None)
input_mail = InputMail.from_dict(mail_dict())
- mail_sender = MailSender('someone@somedomain.tld', self.smtp)
+ mail_sender = LocalSmtpMailSender('someone@somedomain.tld', self.smtp)
return self._succeed(mail_sender.sendmail(input_mail))
@@ -44,7 +44,7 @@ class MailSenderTest(unittest.TestCase):
input_mail = InputMail.from_dict(mail_dict())
- mail_sender = MailSender('someone@somedomain.tld', self.smtp)
+ mail_sender = LocalSmtpMailSender('someone@somedomain.tld', self.smtp)
sent_deferred = mail_sender.sendmail(input_mail)
@@ -55,7 +55,7 @@ class MailSenderTest(unittest.TestCase):
def test_senmail_returns_deffered(self):
when(reactor).connectTCP('localhost', 4650, any()).thenReturn(None)
input_mail = InputMail.from_dict(mail_dict())
- mail_sender = MailSender('someone@somedomain.tld', self.smtp)
+ mail_sender = LocalSmtpMailSender('someone@somedomain.tld', self.smtp)
deferred = mail_sender.sendmail(input_mail)
@@ -66,7 +66,7 @@ class MailSenderTest(unittest.TestCase):
def test_doesnt_send_mail_if_smtp_is_not_running(self):
self.smtp.ensure_running = lambda: False
- mail_sender = MailSender('someone@somedomain.tld', self.smtp)
+ mail_sender = LocalSmtpMailSender('someone@somedomain.tld', self.smtp)
deferred = mail_sender.sendmail({})