Commit 0cfe3fef authored by Yoshinori Okuji's avatar Yoshinori Okuji

stepGetCurrentBusinessTemplate must check if a business template is installed.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4441 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1a2361ea
......@@ -276,8 +276,13 @@ class TestBusinessTemplate(ERP5TypeTestCase):
template_tool = self.getTemplateTool()
current_bt_sql = template_tool.searchFolder(
title=self.business_template_title)
self.failUnless(len(current_bt_sql) == 1)
current_bt = current_bt_sql[0].getObject()
current_bt_list = []
for bt in current_bt_sql:
ob = bt.getObject()
if ob.getInstallationState() == 'installed':
current_bt_list.append(ob)
self.assertEquals(len(current_bt_list), 1)
current_bt = current_bt_list[0]
sequence.edit(current_bt=current_bt)
def stepCopyBusinessTemplate(self, sequence=None, sequence_list=None, **kw):
......
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