Commit bca72e3d authored by Nicolas Delaby's avatar Nicolas Delaby

Define preferences required to init Bug Lines

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35398 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f74c0ef8
# -*- coding: utf-8 -*-
#############################################################################
#
# Copyright (c) 2007-2008 Nexedi SA and Contributors. All Rights Reserved.
......@@ -72,14 +73,23 @@ class TestBug(ERP5TypeTestCase):
Initialize the ERP5 site.
"""
self.login()
self.setDefaultSitePreference()
self.datetime = DateTime()
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'))
def setDefaultSitePreference(self):
default_preference = self.portal.portal_preferences.default_site_preference
default_preference.setPreferredTextFormat('text/plain')
default_preference.getPreferredTextEditor('text_area')
if self.portal.portal_workflow.isTransitionPossible(default_preference,
'enable'):
default_preference.enable()
return default_preference
##################################
## Usefull methods
##################################
......
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