From 3e38d592fec04b8f25a0bedab9f0206619c8a4f1 Mon Sep 17 00:00:00 2001 From: Arnaud Fontaine <arnaud.fontaine@nexedi.com> Date: Mon, 5 Nov 2012 19:47:46 +0900 Subject: [PATCH] If a Live Test is interrupted, MailHost may have not been restored yet. --- product/ERP5Type/tests/ERP5TypeTestCase.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/product/ERP5Type/tests/ERP5TypeTestCase.py b/product/ERP5Type/tests/ERP5TypeTestCase.py index 2c4f3a2c8f..f322751c55 100644 --- a/product/ERP5Type/tests/ERP5TypeTestCase.py +++ b/product/ERP5Type/tests/ERP5TypeTestCase.py @@ -286,9 +286,9 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase): """Restore original Mail Host """ cls = self.portal.MailHost.__class__ - assert cls.__bases__[0] is DummyMailHostMixin - cls.__bases__ = cls.__bases__[1:] - pmc_init_of(cls) + if cls.__bases__[0] is DummyMailHostMixin: + cls.__bases__ = cls.__bases__[1:] + pmc_init_of(cls) def pinDateTime(self, date_time): # pretend time has stopped at a certain date (i.e. the test runs -- 2.30.9