Commit 87dbf0d0 authored by Fabien Morin's avatar Fabien Morin

change test and external method to use DummyMailHost not to send real messages (thanks to jerome)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21726 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e08857ed
......@@ -15,7 +15,7 @@ Thanks for registrering to SAFI, now you can connect in on www.safi.sn with the
Login: %s
Password: %s
""" % ('', user_email, 'your credential for www.safi.sn',
""" % ('fabien@nexedi.com', user_email, 'your credential for www.safi.sn',
login, password)
try:
......
......@@ -29,6 +29,7 @@ from Testing.ZopeTestCase.PortalTestCase import PortalTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
from AccessControl.SecurityManagement import getSecurityManager
from Products.ERP5Type.tests.utils import DummyMailHost
from AccessControl import Unauthorized
from Testing import ZopeTestCase
......@@ -74,6 +75,12 @@ class TestEGovMixin(SecurityTestCase):
Method called before the launch of the test to initialize some data
"""
self.createManagerAndLogin()
# add a dummy mailhost not to send real messages
if 'MailHost' in self.portal.objectIds():
self.portal.manage_delObjects(['MailHost'])
self.portal._setObject('MailHost', DummyMailHost('MailHost'))
# remove all message in the message_table because
# the previous test might have failed
message_list = self.getPortal().portal_activities.getMessageList()
......
176
\ No newline at end of file
179
\ No newline at end of file
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