From 666709fb636f89b2410ef816ac33ccb6619145c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Tue, 22 Sep 2015 11:00:35 +0200 Subject: [PATCH] testBusinessTemplate: Use different business templates names in each tests Quick way to isolate tests --- product/ERP5/tests/testBusinessTemplate.py | 12 ++++++------ .../bt/title | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/product/ERP5/tests/testBusinessTemplate.py b/product/ERP5/tests/testBusinessTemplate.py index fa9df87d82..83a5e13d62 100644 --- a/product/ERP5/tests/testBusinessTemplate.py +++ b/product/ERP5/tests/testBusinessTemplate.py @@ -6333,7 +6333,7 @@ class TestBusinessTemplate(BusinessTemplateMixin): # check the previously existing instance now behaves as the overriden class self.assertTrue(getattr(portal.another_file, 'isClassOverriden', False)) # test uninstall is effective - self.uninstallBusinessTemplate('test_bt') + self.uninstallBusinessTemplate('test_167_InstanceAndRelatedClassDefinedInSameBT') # check both File instances no longer behave like being overriden self.assertFalse(getattr(portal.another_file, 'isClassOverriden', False)) @@ -6375,7 +6375,7 @@ class TestBusinessTemplate(BusinessTemplateMixin): bt = self.portal.portal_templates.newContent( portal_type='Business Template', - title='test_bt', + title='test_bt_%s' % self.id(), template_tool_id_list=('dummy_type_provider', ), template_portal_type_id_list=('Dummy Type',), template_portal_type_role_list=('Dummy Type', ), @@ -6473,7 +6473,7 @@ class TestBusinessTemplate(BusinessTemplateMixin): bt = self.portal.portal_templates.newContent( portal_type='Business Template', - title='test_bt', + title='test_bt_%s' % self.id(), template_tool_id_list=('dummy_type_provider', ),) self.tic() bt.build() @@ -6506,7 +6506,7 @@ class TestBusinessTemplate(BusinessTemplateMixin): # contain type_provider. bt = self.portal.portal_templates.newContent( portal_type='Business Template', - title='test_bt',) + title='test_bt_%s' % self.id(),) self.tic() bt.build() self.tic() @@ -6536,7 +6536,7 @@ class TestBusinessTemplate(BusinessTemplateMixin): bt = self.portal.portal_templates.newContent( portal_type='Business Template', - title='test_bt', + title='test_bt_%s' % self.id(), template_action_path_list=( 'portal_actions | test_global_action',),) self.tic() @@ -6583,7 +6583,7 @@ class TestBusinessTemplate(BusinessTemplateMixin): bt = self.portal.portal_templates.newContent( portal_type='Business Template', - title='test_bt', + title='test_bt_%s' % self.id(), template_path_list=( 'exported_path',)) self.tic() diff --git a/product/ERP5/tests/test_data/test_167_InstanceAndRelatedClassDefinedInSameBT/bt/title b/product/ERP5/tests/test_data/test_167_InstanceAndRelatedClassDefinedInSameBT/bt/title index f55db5c645..6ffcaf7a75 100644 --- a/product/ERP5/tests/test_data/test_167_InstanceAndRelatedClassDefinedInSameBT/bt/title +++ b/product/ERP5/tests/test_data/test_167_InstanceAndRelatedClassDefinedInSameBT/bt/title @@ -1 +1 @@ -test_bt \ No newline at end of file +test_167_InstanceAndRelatedClassDefinedInSameBT \ No newline at end of file -- 2.30.9