Commit 81a6bf4b authored by Julien Muchembled's avatar Julien Muchembled

Delete failed activities in beforeTearDown so that following tests work

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30911 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f7024258
......@@ -141,17 +141,22 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional):
Do some stuff after each test:
- clear document module
"""
transaction.abort()
activity_tool = self.portal.portal_activities
activity_status = set(m.processing_node < -1
for m in activity_tool.getMessageList())
if True in activity_status:
activity_tool.manageClearActivities()
else:
assert not activity_status
self.clearDocumentModule()
def clearDocumentModule(self):
"""
Remove everything after each run
"""
transaction.abort()
self.tic()
doc_module = self.getDocumentModule()
ids = [i for i in doc_module.objectIds()]
doc_module.manage_delObjects(ids)
doc_module.manage_delObjects(list(doc_module.objectIds()))
transaction.commit()
self.tic()
......@@ -582,6 +587,7 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional):
response.headers['content-type'])
self.assertEquals('attachment; filename="import_data_list.ods"',
response.headers['content-disposition'])
self.tic()
def test_Member_download_pdf_format(self):
# tests that members can download OOo documents in pdf format (at least in
......
......@@ -113,6 +113,13 @@ class TestIngestion(ERP5TypeTestCase):
self.setTools()
def beforeTearDown(self):
activity_tool = self.portal.portal_activities
activity_status = set(m.processing_node < -1
for m in activity_tool.getMessageList())
if True in activity_status:
activity_tool.manageClearActivities()
else:
assert not activity_status
self.portal.portal_caches.clearAllCache()
def setSystemPreference(self):
......@@ -1197,6 +1204,7 @@ class TestIngestion(ERP5TypeTestCase):
step_list = [ 'stepCleanUp'
,'stepCreatePDFDocument'
,'stepExportPDF'
,'stepTic'
]
self.playSequence(step_list, quiet)
......@@ -1231,6 +1239,7 @@ class TestIngestion(ERP5TypeTestCase):
,'stepDeleteSnapshot'
,'stepCheckHasNoSnapshot'
,'stepCreateSnapshot'
,'stepTic'
]
self.playSequence(step_list, quiet)
......
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