summaryrefslogtreecommitdiff
path: root/service/test/support/integration/app_test_client.py
diff options
context:
space:
mode:
authorNavaL <mnandri@thoughtworks.com>2016-02-03 17:23:42 +0100
committerNavaL <mnandri@thoughtworks.com>2016-02-05 14:43:07 +0100
commite7f77052f0aba1b84febf0ab1382c9602bbf7f93 (patch)
tree5fd8dd1016cbb21ebd4572284ca84f24bd9ccfa1 /service/test/support/integration/app_test_client.py
parent92f0e9887a216e0ec82355941655d3deebf2d422 (diff)
closing the services closes leap session, which stops background tasks, close soldedad and remove it from cache
Issue #586
Diffstat (limited to 'service/test/support/integration/app_test_client.py')
-rw-r--r--service/test/support/integration/app_test_client.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py
index e841cfe5..99f4ebc7 100644
--- a/service/test/support/integration/app_test_client.py
+++ b/service/test/support/integration/app_test_client.py
@@ -39,6 +39,7 @@ from pixelated.adapter.services.feedback_service import FeedbackService
from pixelated.application import ServicesFactory, UserAgentMode, SingleUserServicesFactory, set_up_protected_resources
from pixelated.bitmask_libraries.config import LeapConfig
from pixelated.bitmask_libraries.session import LeapSession
+from pixelated.config.services import Services
from pixelated.config.site import PixelatedSite
from pixelated.adapter.mailstore import LeapMailStore
@@ -92,14 +93,16 @@ class AppTestAccount(object):
@property
def services(self):
if self._services is None:
- services = mock()
+ services = mock(Services)
services.keymanager = self.keymanager
services.mail_service = self.mail_service
services.draft_service = self.draft_service
services.search_engine = self.search_engine
services.feedback_service = self.feedback_service
+ services._leap_session = self.leap_session
self._services = services
+ self.leap_session.close = lambda: 'mocked'
return self._services