From e803b0163c78efb7dca54c75b4bb09d8d7a991c7 Mon Sep 17 00:00:00 2001
From: Folker Bernitt <fbernitt@thoughtworks.com>
Date: Mon, 9 Feb 2015 15:48:46 +0100
Subject: Sending a mail is always successful in functional test context.

- Issue #249
---
 service/test/support/integration/app_test_client.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py
index dd2d0200..219a77c6 100644
--- a/service/test/support/integration/app_test_client.py
+++ b/service/test/support/integration/app_test_client.py
@@ -31,7 +31,6 @@ from pixelated.config import App
 from pixelated.resources.root_resource import RootResource
 from pixelated.adapter.model.mail import PixelatedMail
 from pixelated.adapter.search import SearchEngine
-from test.support.integration.model import MailBuilder
 from test.support.test_helper import request_mock
 from twisted.internet import reactor
 from twisted.internet.defer import succeed
@@ -74,6 +73,9 @@ class AppTestClient:
 
         self.app.resource = RootResource()
 
+        # sending a mail is always successful
+        self.mail_sender.sendmail.side_effect = lambda mail: succeed(mail)
+
         self.app.resource.initialize(self.soledad_querier, self.search_engine, self.mail_service, self.draft_service)
 
     def _render(self, request, as_json=True):
-- 
cgit v1.2.3