summaryrefslogtreecommitdiff
path: root/service/test
diff options
context:
space:
mode:
authorDuda Dornelles <ddornell@thoughtworks.com>2015-02-04 05:22:13 -0200
committerDuda Dornelles <ddornell@thoughtworks.com>2015-02-04 05:22:13 -0200
commita7beccf1e219c4e946bc8c90335683e2e6b20d01 (patch)
tree5bb7ccd865858d406fa1d5d905fdd2e9d901d307 /service/test
parent09f1ec352f4eb7ce4a1f97beb80887c22f70ce30 (diff)
Refactoring more of resource logic into service. No more search engine on mail(s) resource
Diffstat (limited to 'service/test')
-rw-r--r--service/test/unit/adapter/test_mail_service.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/service/test/unit/adapter/test_mail_service.py b/service/test/unit/adapter/test_mail_service.py
index 4b1c60d6..137c17ee 100644
--- a/service/test/unit/adapter/test_mail_service.py
+++ b/service/test/unit/adapter/test_mail_service.py
@@ -14,10 +14,10 @@
# 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.model.mail import InputMail
+from pixelated.adapter.model.mail import InputMail, PixelatedMail
from pixelated.adapter.services.mail_service import MailService
-from test.support.test_helper import mail_dict
+from test.support.test_helper import mail_dict, leap_mail
from mockito import *
@@ -49,6 +49,9 @@ class TestMailService(unittest.TestCase):
verify(mail).mark_as_read()
def test_delete_mail(self):
+ mail_to_delete = PixelatedMail.from_soledad(*leap_mail(), soledad_querier=None)
+ when(self.mail_service).mail(1).thenReturn(mail_to_delete)
+
self.mail_service.delete_mail(1)
verify(self.mailboxes).move_to_trash(1)