Commit 00e368b5 authored by Jérome Perrin's avatar Jérome Perrin

override beforeTearDown, not tearDown


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16219 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 20fea955
...@@ -165,12 +165,11 @@ class TestDocument(ERP5TypeTestCase): ...@@ -165,12 +165,11 @@ class TestDocument(ERP5TypeTestCase):
def getNeededCategoryList(self): def getNeededCategoryList(self):
return () return ()
def tearDown(self): def beforeTearDown(self):
""" """
Do some stuff after each test: Do some stuff after each test:
- clear document module - clear document module
""" """
# XXX Is it safe to overwrite tearDown?
self.clearDocumentModule() self.clearDocumentModule()
def clearDocumentModule(self): def clearDocumentModule(self):
...@@ -178,6 +177,8 @@ class TestDocument(ERP5TypeTestCase): ...@@ -178,6 +177,8 @@ class TestDocument(ERP5TypeTestCase):
Remove everything after each run Remove everything after each run
""" """
printAndLog("clearing document module...") printAndLog("clearing document module...")
get_transaction().abort()
self.tic()
doc_module = self.getDocumentModule() doc_module = self.getDocumentModule()
ids = [i for i in doc_module.objectIds()] ids = [i for i in doc_module.objectIds()]
doc_module.manage_delObjects(ids) doc_module.manage_delObjects(ids)
......
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