Commit a0d1ba54 authored by Rafael Monnerat's avatar Rafael Monnerat

Return revision to original value.

parent 448bf18f
...@@ -71,17 +71,22 @@ class TestTemplateTool(ERP5TypeTestCase): ...@@ -71,17 +71,22 @@ class TestTemplateTool(ERP5TypeTestCase):
bt_list = self.templates_tool.searchFolder(title='erp5_base') bt_list = self.templates_tool.searchFolder(title='erp5_base')
self.assertEquals(len(bt_list), 1) self.assertEquals(len(bt_list), 1)
erp5_base = bt_list[0].getObject() erp5_base = bt_list[0].getObject()
try:
erp5_base.edit(revision=int(erp5_base.getRevision()) - 10) erp5_base.edit(revision=int(erp5_base.getRevision()) - 10)
updatable_bt_list = self.templates_tool.getRepositoryBusinessTemplateList(update_only=True) updatable_bt_list = \
self.templates_tool.getRepositoryBusinessTemplateList(update_only=True)
self.assertEqual( self.assertEqual(
[i.title for i in updatable_bt_list if i.title == "erp5_base"], [i.title for i in updatable_bt_list if i.title == "erp5_base"],
["erp5_base"]) ["erp5_base"])
erp5_base.replace() erp5_base.replace()
updatable_bt_list = self.templates_tool.getRepositoryBusinessTemplateList(update_only=True) updatable_bt_list = \
self.templates_tool.getRepositoryBusinessTemplateList(update_only=True)
self.assertEqual( self.assertEqual(
[i.title for i in updatable_bt_list if i.title == "erp5_base"], [i.title for i in updatable_bt_list if i.title == "erp5_base"],
[]) [])
finally:
erp5_base.edit(revision=int(erp5_base.getRevision()) + 10)
def test_download_http(self): def test_download_http(self):
test_web = self.portal.portal_templates.download( test_web = self.portal.portal_templates.download(
......
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