summaryrefslogtreecommitdiff
path: root/service/test
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2015-02-09 15:48:46 +0100
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-02-09 15:48:46 +0100
commite803b0163c78efb7dca54c75b4bb09d8d7a991c7 (patch)
tree1d5d098815921e83d8cfd436d9184ddb90597183 /service/test
parentc579085454785ec7d8fe0622b4da43b070095472 (diff)
Sending a mail is always successful in functional test context.
- Issue #249
Diffstat (limited to 'service/test')
-rw-r--r--service/test/support/integration/app_test_client.py4
1 files changed, 3 insertions, 1 deletions
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):