From c8336d8fa7cd642800805d3a7ef26b3cf486d757 Mon Sep 17 00:00:00 2001 From: Julien Muchembled <jm@nexedi.com> Date: Thu, 17 Feb 2011 17:29:32 +0000 Subject: [PATCH] Fix setup of DummyMailHost git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43446 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/tests/ERP5TypeTestCase.py | 3 +++ product/ERP5Type/tests/utils.py | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/product/ERP5Type/tests/ERP5TypeTestCase.py b/product/ERP5Type/tests/ERP5TypeTestCase.py index e8e28a3650..daede148f4 100644 --- a/product/ERP5Type/tests/ERP5TypeTestCase.py +++ b/product/ERP5Type/tests/ERP5TypeTestCase.py @@ -24,6 +24,7 @@ from cStringIO import StringIO from cPickle import dumps from glob import glob from warnings import warn +from ExtensionClass import pmc_init_of from ZTUtils import make_query # XXX make sure that get_request works. @@ -328,6 +329,7 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase): cls = self.portal.MailHost.__class__ assert not issubclass(cls, DummyMailHostMixin) cls.__bases__ = (DummyMailHostMixin,) + cls.__bases__ + pmc_init_of(cls) def _restoreMailHost(self): """Restore original Mail Host @@ -335,6 +337,7 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase): cls = self.portal.MailHost.__class__ assert cls.__bases__[0] is DummyMailHostMixin cls.__bases__ = cls.__bases__[1:] + pmc_init_of(cls) def getDefaultSitePreferenceId(self): """Default id, usefull method to override diff --git a/product/ERP5Type/tests/utils.py b/product/ERP5Type/tests/utils.py index 7bb5639bc8..8574f8b768 100644 --- a/product/ERP5Type/tests/utils.py +++ b/product/ERP5Type/tests/utils.py @@ -97,10 +97,6 @@ class DummyMailHostMixin(object): cls._previous_message = () cls._message_list = [] - @classmethod - def getUid(cls): - return 0 - class DummyMailHost(DummyMailHostMixin, MailHost): pass -- 2.30.9