From 0cfe3fef693f3e1d7418c915c5ec2da0062470dd Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Thu, 1 Dec 2005 07:01:29 +0000 Subject: [PATCH] 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 --- product/ERP5/tests/testBusinessTemplate.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/product/ERP5/tests/testBusinessTemplate.py b/product/ERP5/tests/testBusinessTemplate.py index 4195a2aab9..869cdc078b 100755 --- a/product/ERP5/tests/testBusinessTemplate.py +++ b/product/ERP5/tests/testBusinessTemplate.py @@ -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): -- 2.30.9