Commit cd739bc6 authored by Jérome Perrin's avatar Jérome Perrin

ui_test_core: reset sent messages when setting up dummy mailhost

this way after a zelenium tests ERP5Site_setupDummyMailHost this will
also reset the mails that could have been sent in previous tests.
parent 2345b09c
......@@ -31,11 +31,14 @@ from Products.ERP5Type.tests.utils import DummyMailHostMixin
def setupDummyMailHost(self):
"""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
"""
cls = self.getPortalObject().MailHost.__class__
mailhost = self.getPortalObject().MailHost
cls = mailhost.__class__
if not issubclass(cls, DummyMailHostMixin):
cls.__bases__ = (DummyMailHostMixin,) + cls.__bases__
pmc_init_of(cls)
mailhost.reset()
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