Commit 41e9f908 authored by Jérome Perrin's avatar Jérome Perrin

test_standard_translated_related_keys was not working becasue

ERP5Site_updateTranslationTable has to be called when new translations are
added.
We also need to cleanup after each test, not to get persons created in other
tests, this revealed a bug in ERP5Site_checkDataWithScript, it was getting
objects created in the previous test, the test was not failing though, because
previous test objects have the same urls


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26025 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3287023c
......@@ -67,7 +67,7 @@ class TestERP5Base(ERP5TypeTestCase):
return ('erp5_base',)
def afterSetUp(self, quiet=QUIET, run=RUN_ALL_TEST):
def afterSetUp(self):
"""
Initialize the ERP5 site.
"""
......@@ -80,7 +80,13 @@ class TestERP5Base(ERP5TypeTestCase):
self.createCategories()
# self.login_as_member()
def beforeTearDown(self):
transaction.abort()
for module in ( self.portal.person_module,
self.portal.organisation_module, ):
module.manage_delObjects(list(module.objectIds()))
transaction.commit()
self.tic()
##################################
## Usefull methods
......@@ -1322,6 +1328,7 @@ class TestERP5Base(ERP5TypeTestCase):
active_process = portal_activities.newActiveProcess()
portal_activities.ERP5Site_checkDataWithScript(method_id=test, tag=test,
active_process=active_process.getPath())
transaction.commit()
self.tic()
relative_url_list = sum((x.detail.split('\n')
for x in active_process.getResultList()), [])
......@@ -1347,6 +1354,8 @@ class TestERP5Base(ERP5TypeTestCase):
message_catalog.message_edit('Draft', lang, 'Brouillon', '')
message_catalog.message_edit('Person', lang, 'Personne', '')
self.portal.ERP5Site_updateTranslationTable()
person_1 = self.portal.person_module.newContent(portal_type='Person')
person_1.validate()
person_2 = self.portal.person_module.newContent(portal_type='Person')
......
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