Commit e3026b59 authored by Rafael Monnerat's avatar Rafael Monnerat

Be more assertive, sometimes business template into...

Be more assertive, sometimes business template into http://www.erp5.org/dists/snapshot/bt5/ are updated causing some insconsistence and false positives.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43479 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1ab2be9a
......@@ -60,10 +60,18 @@ class TestTemplateTool(ERP5TypeTestCase):
self.assertEquals(len(bt_list), 1)
erp5_base = bt_list[0].getObject()
erp5_base.edit(revision=int(erp5_base.getRevision()) - 10)
self.templates_tool.updateRepositoryBusinessTemplateList(["http://www.erp5.org/dists/snapshot/bt5/",])
self.assertEqual(len(self.templates_tool.getRepositoryBusinessTemplateList(update_only=True)), 1)
self.templates_tool.updateRepositoryBusinessTemplateList(\
["http://www.erp5.org/dists/snapshot/bt5/",])
updatable_bt_list = self.templates_tool.getRepositoryBusinessTemplateList(update_only=True)
self.assertEqual(
[i.title for i in updatable_bt_list if i.title == "erp5_base"],
["erp5_base"])
erp5_base.replace()
self.assertEqual(len(self.templates_tool.getRepositoryBusinessTemplateList(update_only=True)), 0)
updatable_bt_list = self.templates_tool.getRepositoryBusinessTemplateList(update_only=True)
self.assertEqual(
[i.title for i in updatable_bt_list if i.title == "erp5_base"],
[])
def test_suite():
......
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