Commit 3bea10bb authored by Rafael Monnerat's avatar Rafael Monnerat

Tinnies style changes.

parent 61b78ab1
...@@ -55,7 +55,8 @@ class TestTemplateTool(ERP5TypeTestCase): ...@@ -55,7 +55,8 @@ class TestTemplateTool(ERP5TypeTestCase):
def afterSetUp(self): def afterSetUp(self):
self.templates_tool = self.portal.portal_templates self.templates_tool = self.portal.portal_templates
self.templates_tool.updateRepositoryBusinessTemplateList(\ self.templates_tool.updateRepositoryBusinessTemplateList(\
["http://www.erp5.org/dists/snapshot/bt5/",]) ["http://www.erp5.org/dists/snapshot/bt5/", ])
def beforeTearDown(self): def beforeTearDown(self):
uninstall_bt_list = ["erp5_odt_style", "erp5_pdm", 'erp5_accounting'] uninstall_bt_list = ["erp5_odt_style", "erp5_pdm", 'erp5_accounting']
...@@ -168,7 +169,7 @@ class TestTemplateTool(ERP5TypeTestCase): ...@@ -168,7 +169,7 @@ class TestTemplateTool(ERP5TypeTestCase):
template_tool = self.portal.portal_templates template_tool = self.portal.portal_templates
url = 'https://svn.erp5.org/repos/public/erp5/trunk/bt5/test_core' url = 'https://svn.erp5.org/repos/public/erp5/trunk/bt5/test_core'
# don't install test_file # don't install test_file
keep_original_list = ( 'portal_skins/erp5_test/test_file', ) keep_original_list = ('portal_skins/erp5_test/test_file', )
template_tool.updateBusinessTemplateFromUrl(url, template_tool.updateBusinessTemplateFromUrl(url,
keep_original_list=keep_original_list) keep_original_list=keep_original_list)
bt = template_tool.getInstalledBusinessTemplate('test_core') bt = template_tool.getInstalledBusinessTemplate('test_core')
...@@ -299,7 +300,7 @@ class TestTemplateTool(ERP5TypeTestCase): ...@@ -299,7 +300,7 @@ class TestTemplateTool(ERP5TypeTestCase):
def test_getInstalledBusinessTemplateList(self): def test_getInstalledBusinessTemplateList(self):
templates_tool = self.getPortal().portal_templates templates_tool = self.getPortal().portal_templates
bt5_list = templates_tool.getInstalledBusinessTemplateList() bt5_list = templates_tool.getInstalledBusinessTemplateList()
another_bt_list = [ i for i in templates_tool.contentValues() \ another_bt_list = [i for i in templates_tool.contentValues() \
if i.getInstallationState() == 'installed'] if i.getInstallationState() == 'installed']
self.assertEquals(len(bt5_list), len(another_bt_list)) self.assertEquals(len(bt5_list), len(another_bt_list))
for bt in bt5_list: for bt in bt5_list:
...@@ -311,7 +312,7 @@ class TestTemplateTool(ERP5TypeTestCase): ...@@ -311,7 +312,7 @@ class TestTemplateTool(ERP5TypeTestCase):
def test_getInstalledBusinessTemplateTitleList(self): def test_getInstalledBusinessTemplateTitleList(self):
templates_tool = self.getPortal().portal_templates templates_tool = self.getPortal().portal_templates
bt5_list = templates_tool.getInstalledBusinessTemplateTitleList() bt5_list = templates_tool.getInstalledBusinessTemplateTitleList()
another_bt_list = [ i.getTitle() for i in templates_tool.contentValues() \ another_bt_list = [i.getTitle() for i in templates_tool.contentValues() \
if i.getInstallationState() == 'installed'] if i.getInstallationState() == 'installed']
bt5_list.sort() bt5_list.sort()
another_bt_list.sort() another_bt_list.sort()
...@@ -328,7 +329,7 @@ class TestTemplateTool(ERP5TypeTestCase): ...@@ -328,7 +329,7 @@ class TestTemplateTool(ERP5TypeTestCase):
template template
""" """
# How to define an existing and use INSTANCE_HOME_REPOSITORY? # How to define an existing and use INSTANCE_HOME_REPOSITORY?
url_list = [ 'https://svn.erp5.org/repos/public/erp5/trunk/bt5', url_list = ['https://svn.erp5.org/repos/public/erp5/trunk/bt5',
'http://www.erp5.org/dists/snapshot/bt5', 'http://www.erp5.org/dists/snapshot/bt5',
'http://www.erp5.org/dists/release/5.4.5/bt5', 'http://www.erp5.org/dists/release/5.4.5/bt5',
"INSTANCE_HOME_REPOSITORY", "INSTANCE_HOME_REPOSITORY",
...@@ -390,8 +391,9 @@ class TestTemplateTool(ERP5TypeTestCase): ...@@ -390,8 +391,9 @@ class TestTemplateTool(ERP5TypeTestCase):
(repository, 'erp5_configurator.bt5'), (repository, 'erp5_configurator.bt5'),
(repository, 'erp5_configurator_ung.bt5')], bt5_list) (repository, 'erp5_configurator_ung.bt5')], bt5_list)
bt5_id_list = ['erp5_configurator_ung', 'erp5_accounting', 'erp5_invoicing', bt5_id_list = ['erp5_configurator_ung', 'erp5_accounting',
'erp5_crm'] 'erp5_invoicing', 'erp5_crm']
bt5_list = template_tool.resolveBusinessTemplateListDependency(bt5_id_list) bt5_list = template_tool.resolveBusinessTemplateListDependency(bt5_id_list)
self.assertEquals([(repository, 'erp5_ingestion_mysql_innodb_catalog.bt5'), self.assertEquals([(repository, 'erp5_ingestion_mysql_innodb_catalog.bt5'),
(repository, 'erp5_workflow.bt5'), (repository, 'erp5_workflow.bt5'),
......
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