Commit 2e3e1518 authored by Kevin Deldycke's avatar Kevin Deldycke

Use DummyMailHost to not send mail automaticcaly

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12695 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c6e7f586
......@@ -32,7 +32,7 @@ from zLOG import LOG
from Testing import ZopeTestCase
from DateTime import DateTime
from Products.CMFCore.utils import getToolByName
from Products.ERP5Type.Utils import convertToUpperCase
from Products.ERP5Type.Utils import convertToUpperCase, DummyMailHost
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.Sequence import SequenceList
from AccessControl.SecurityManagement import newSecurityManager
......@@ -85,6 +85,11 @@ class TestBug(ERP5TypeTestCase):
self.datetime = DateTime() # Save today at initialisation to "freeze" the time
self.portal = self.getPortal()
self.workflow_tool = self.portal.portal_workflow
# Use a dummy mailhost to not send mail notification to the guy how run unit test
if 'MailHost' in self.portal.objectIds():
self.portal.manage_delObjects(['MailHost'])
self.portal._setObject('MailHost', DummyMailHost('MailHost'))
##################################
......@@ -125,7 +130,7 @@ class TestBug(ERP5TypeTestCase):
, title = 'This is an important bug'
, description = 'This %µ&~#^@! bug always happend on ERP5 start. The solution consist to kill the developper.'
, start_date = self.datetime # Today
, stop_date = self.datetime # Today XXXXXXXXXXXXXXXXXXXXXX
, stop_date = self.datetime # Today
)
sequence.edit(bug = bug)
......
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