Commit 6edf29c6 authored by Julien Muchembled's avatar Julien Muchembled

ERP5TypeLiveTestCase: remove beforeClear

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42926 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6aa09eaa
......@@ -132,11 +132,14 @@ class ViFiBOrderTest(ERP5TypeLiveTestCase):
# XXX
#self.login('jp')
def beforeClear(self):
"""This method should be moved up to ERP5TypeLiveTestCase
or to a subclass of it
"""
self.cleanupGarbage()
#def beforeClear(self):
# """This method should be moved up to ERP5TypeLiveTestCase
# or to a subclass of it
#
# XXX beforeClear was removed from ERP5TypeLiveTestCase
# XXX when should should cleanupGarbage be called ?
# """
# self.cleanupGarbage()
def collectGarbage(self, document):
"""Keeps a list of documents to erase at the end of the test
......
69
\ No newline at end of file
70
\ No newline at end of file
......@@ -118,38 +118,13 @@ class ERP5TypeLiveTestCase(ERP5TypeTestCaseMixin):
self.portal.portal_activities.unsubscribe()
self._setUpDummyMailHost()
def setUp(self):
'''Sets up the fixture. Do not override,
use the hooks instead.
'''
try:
self.beforeSetUp()
self.app = self._app()
self.portal = self._portal()
self._setup()
self.afterSetUp()
except:
self.beforeClear()
self._clear()
raise
setUp = PortalTestCase.setUp
tearDown = PortalTestCase.tearDown
def _app(self):
'''Returns the app object for a test.'''
return self.getPortal().aq_parent
def beforeClear(self):
'''Called before _clear(). Subclasses should
use it to garbage collect objects which must not remain
in the system
'''
pass
def tearDown(self):
'''Tears down the fixture. Do not override,
use the hooks instead.
'''
PortalTestCase.tearDown(self)
def runLiveTest(test_list, verbosity=1, stream=None, **kw):
from Products.ERP5Type.tests.runUnitTest import DebugTestResult
......
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