Commit 7673653f authored by Jérome Perrin's avatar Jérome Perrin

ui_test_core: reset sent messages when setting up dummy mailhost

parent 595accf1
...@@ -31,11 +31,14 @@ from Products.ERP5Type.tests.utils import DummyMailHostMixin ...@@ -31,11 +31,14 @@ from Products.ERP5Type.tests.utils import DummyMailHostMixin
def setupDummyMailHost(self): def setupDummyMailHost(self):
"""Replace Original Mail Host by Dummy Mail Host in a non-persistent way """Replace Original Mail Host by Dummy Mail Host in a non-persistent way
and reset the list of already sent messages.
Copied & pasted from ERP5TypeTestCaseMixin._setUpDummyMailHost Copied & pasted from ERP5TypeTestCaseMixin._setUpDummyMailHost
""" """
cls = self.getPortalObject().MailHost.__class__ mailhost = self.getPortalObject().MailHost
cls = mailhost.__class__
if not issubclass(cls, DummyMailHostMixin): if not issubclass(cls, DummyMailHostMixin):
cls.__bases__ = (DummyMailHostMixin,) + cls.__bases__ cls.__bases__ = (DummyMailHostMixin,) + cls.__bases__
pmc_init_of(cls) pmc_init_of(cls)
mailhost.reset()
return True return True
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