Commit c8336d8f authored by Julien Muchembled's avatar Julien Muchembled

Fix setup of DummyMailHost

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43446 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 44ecaaba
...@@ -24,6 +24,7 @@ from cStringIO import StringIO ...@@ -24,6 +24,7 @@ from cStringIO import StringIO
from cPickle import dumps from cPickle import dumps
from glob import glob from glob import glob
from warnings import warn from warnings import warn
from ExtensionClass import pmc_init_of
from ZTUtils import make_query from ZTUtils import make_query
# XXX make sure that get_request works. # XXX make sure that get_request works.
...@@ -328,6 +329,7 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase): ...@@ -328,6 +329,7 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
cls = self.portal.MailHost.__class__ cls = self.portal.MailHost.__class__
assert not issubclass(cls, DummyMailHostMixin) assert not issubclass(cls, DummyMailHostMixin)
cls.__bases__ = (DummyMailHostMixin,) + cls.__bases__ cls.__bases__ = (DummyMailHostMixin,) + cls.__bases__
pmc_init_of(cls)
def _restoreMailHost(self): def _restoreMailHost(self):
"""Restore original Mail Host """Restore original Mail Host
...@@ -335,6 +337,7 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase): ...@@ -335,6 +337,7 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
cls = self.portal.MailHost.__class__ cls = self.portal.MailHost.__class__
assert cls.__bases__[0] is DummyMailHostMixin assert cls.__bases__[0] is DummyMailHostMixin
cls.__bases__ = cls.__bases__[1:] cls.__bases__ = cls.__bases__[1:]
pmc_init_of(cls)
def getDefaultSitePreferenceId(self): def getDefaultSitePreferenceId(self):
"""Default id, usefull method to override """Default id, usefull method to override
......
...@@ -97,10 +97,6 @@ class DummyMailHostMixin(object): ...@@ -97,10 +97,6 @@ class DummyMailHostMixin(object):
cls._previous_message = () cls._previous_message = ()
cls._message_list = [] cls._message_list = []
@classmethod
def getUid(cls):
return 0
class DummyMailHost(DummyMailHostMixin, MailHost): class DummyMailHost(DummyMailHostMixin, MailHost):
pass pass
......
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