summaryrefslogtreecommitdiff
path: root/service/test/unit/adapter/mail_service_test.py
diff options
context:
space:
mode:
authorDuda Dornelles <dudassdornelles@gmail.com>2015-01-22 10:25:40 -0200
committerPixpoa pairing <pixpoapairing@pixelated-project.org>2015-01-22 10:42:48 -0200
commita8274b633a62262e65c7d013e61a54541ce07bf8 (patch)
treeab3172f3fd1ffe9311bd5f1f2b0ccc139bbc14d1 /service/test/unit/adapter/mail_service_test.py
parent137f1f103cf1bfb76c7e62f2ee9df21d2d1f6223 (diff)
#224 renaming tests so they get caught by trial runner
Diffstat (limited to 'service/test/unit/adapter/mail_service_test.py')
-rw-r--r--service/test/unit/adapter/mail_service_test.py51
1 files changed, 0 insertions, 51 deletions
diff --git a/service/test/unit/adapter/mail_service_test.py b/service/test/unit/adapter/mail_service_test.py
deleted file mode 100644
index fca6e79b..00000000
--- a/service/test/unit/adapter/mail_service_test.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Copyright (c) 2014 ThoughtWorks, Inc.
-#
-# Pixelated is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Pixelated is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-import unittest
-
-from pixelated.adapter.services.mail_service import MailService
-from mockito import *
-
-
-class TestMailService(unittest.TestCase):
- def setUp(self):
- self.querier = mock()
- self.mailboxes = mock()
- self.tag_service = mock()
- self.mailboxes.drafts = lambda: mock()
- self.mailboxes.trash = lambda: mock()
- self.mailboxes.sent = lambda: mock()
-
- self.mail_sender = mock()
- self.mail_service = MailService(self.mailboxes, self.mail_sender, self.tag_service, self.querier)
-
- def test_send_mail(self):
- mail = "mail"
-
- self.mail_service.send(1, mail)
-
- verify(self.mail_sender).sendmail(mail)
-
- def test_mark_as_read(self):
- mail = mock()
- when(self.mail_service).mail(any()).thenReturn(mail)
- self.mail_service.mark_as_read(1)
-
- verify(mail).mark_as_read()
-
- def test_delete_mail(self):
- self.mail_service.delete_mail(1)
-
- verify(self.mailboxes).move_to_trash(1)