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): ...@@ -132,11 +132,14 @@ class ViFiBOrderTest(ERP5TypeLiveTestCase):
# XXX # XXX
#self.login('jp') #self.login('jp')
def beforeClear(self): #def beforeClear(self):
"""This method should be moved up to ERP5TypeLiveTestCase # """This method should be moved up to ERP5TypeLiveTestCase
or to a subclass of it # or to a subclass of it
""" #
self.cleanupGarbage() # XXX beforeClear was removed from ERP5TypeLiveTestCase
# XXX when should should cleanupGarbage be called ?
# """
# self.cleanupGarbage()
def collectGarbage(self, document): def collectGarbage(self, document):
"""Keeps a list of documents to erase at the end of the test """Keeps a list of documents to erase at the end of the test
......
69 70
\ No newline at end of file \ No newline at end of file
...@@ -118,38 +118,13 @@ class ERP5TypeLiveTestCase(ERP5TypeTestCaseMixin): ...@@ -118,38 +118,13 @@ class ERP5TypeLiveTestCase(ERP5TypeTestCaseMixin):
self.portal.portal_activities.unsubscribe() self.portal.portal_activities.unsubscribe()
self._setUpDummyMailHost() self._setUpDummyMailHost()
def setUp(self): setUp = PortalTestCase.setUp
'''Sets up the fixture. Do not override, tearDown = PortalTestCase.tearDown
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
def _app(self): def _app(self):
'''Returns the app object for a test.''' '''Returns the app object for a test.'''
return self.getPortal().aq_parent 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): def runLiveTest(test_list, verbosity=1, stream=None, **kw):
from Products.ERP5Type.tests.runUnitTest import DebugTestResult 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