Commit 6a67dfd2 authored by Jérome Perrin's avatar Jérome Perrin

test: Make close work when setup failed

 ... so that we have setup's error message
parent 8fab4d97
......@@ -135,7 +135,7 @@ class ERP5TypeLiveTestCase(ERP5TypeTestCaseMixin):
self.abort()
self._restoreMailHost()
if self.activity_tool_subscribed:
if getattr(self, "activity_tool_subscribed", False):
self.portal.portal_activities.subscribe()
self.commit()
......
......@@ -267,6 +267,7 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
def _restoreMailHost(self):
"""Restore original Mail Host
"""
if self.portal is not None:
cls = self.portal.MailHost.__class__
if cls.__bases__[0] is DummyMailHostMixin:
cls.__bases__ = cls.__bases__[1:]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment