Commit 2583ffda authored by Jérome Perrin's avatar Jérome Perrin

tests: update tests now that forge depends on CRM

also make testTemplateTool.test_updateBusinessTemplateFromUrl_keep_list
more isolated ( but testTemplateTool still has isolation issues )
parent d938adfd
...@@ -45,6 +45,7 @@ class TestFieldLibraryGuideline(ERP5TypeTestCase): ...@@ -45,6 +45,7 @@ class TestFieldLibraryGuideline(ERP5TypeTestCase):
""" """ """ """
return ( return (
'erp5_base', 'erp5_base',
'erp5_crm',
'erp5_forge', 'erp5_forge',
) )
......
...@@ -179,25 +179,26 @@ class TestTemplateTool(ERP5TypeTestCase): ...@@ -179,25 +179,26 @@ class TestTemplateTool(ERP5TypeTestCase):
self.assertEqual(not_installed_bt5.getRevision(), new_bt.getRevision()) self.assertEqual(not_installed_bt5.getRevision(), new_bt.getRevision())
def test_updateBusinessTemplateFromUrl_keep_list(self): def test_updateBusinessTemplateFromUrl_keep_list(self):
"""
Test updateBusinessTemplateFromUrl method
"""
self._svn_setup_ssl() self._svn_setup_ssl()
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'
# make sure this `test_core` bt is not installed
template_tool.updateBusinessTemplateFromUrl(url)
bt = template_tool.getInstalledBusinessTemplate('test_core')
bt.uninstall()
self.tic()
# 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')
self.assertNotEquals(None, bt) self.assertNotEqual(None, bt)
erp5_test = self.portal.portal_skins['erp5_test'] erp5_test = self.portal.portal_skins['erp5_test']
self.assertFalse(erp5_test.hasObject('test_file')) self.assertFalse(erp5_test.hasObject('test_file'))
def test_updateBusinessTemplateFromUrl_after_before_script(self): def test_updateBusinessTemplateFromUrl_after_before_script(self):
"""
Test updateBusinessTemplateFromUrl method
"""
from Products.ERP5Type.tests.utils import createZODBPythonScript from Products.ERP5Type.tests.utils import createZODBPythonScript
portal = self.getPortal() portal = self.getPortal()
self._svn_setup_ssl() self._svn_setup_ssl()
...@@ -686,7 +687,14 @@ class TestTemplateTool(ERP5TypeTestCase): ...@@ -686,7 +687,14 @@ class TestTemplateTool(ERP5TypeTestCase):
template_tool = self.portal.portal_templates template_tool = self.portal.portal_templates
before = {bt.getTitle(): bt.getId() before = {bt.getTitle(): bt.getId()
for bt in template_tool.getInstalledBusinessTemplateList()} for bt in template_tool.getInstalledBusinessTemplateList()}
bt_title = 'erp5_forge'
bt_title = 'test_core'
# This test will install `bt_title` from repository and check that nothing
# else was installed.
# Test assume that `bt_title` is not installed at this point and that it
# does not depend on anything that's not already installed.
self.assertNotIn(bt_title, before)
template_tool.installBusinessTemplateListFromRepository([bt_title], template_tool.installBusinessTemplateListFromRepository([bt_title],
install_dependency=True) install_dependency=True)
self.tic() self.tic()
......
...@@ -42,7 +42,7 @@ class TestAnonymousSelection(TestZeleniumCore): ...@@ -42,7 +42,7 @@ class TestAnonymousSelection(TestZeleniumCore):
Return the list of business templates. Return the list of business templates.
""" """
return ('erp5_core_proxy_field_legacy', 'erp5_full_text_mroonga_catalog', return ('erp5_core_proxy_field_legacy', 'erp5_full_text_mroonga_catalog',
'erp5_base', 'erp5_ui_test_core', 'erp5_ui_test', 'erp5_forge', 'erp5_base', 'erp5_ui_test_core', 'erp5_ui_test', 'erp5_crm', 'erp5_forge',
'erp5_l10n_fa', 'erp5_l10n_fa',
) )
......
...@@ -40,7 +40,7 @@ class TestZeleniumCore(ERP5TypeFunctionalTestCase): ...@@ -40,7 +40,7 @@ class TestZeleniumCore(ERP5TypeFunctionalTestCase):
Return the list of business templates. Return the list of business templates.
""" """
return ('erp5_core_proxy_field_legacy', 'erp5_full_text_mroonga_catalog', return ('erp5_core_proxy_field_legacy', 'erp5_full_text_mroonga_catalog',
'erp5_base', 'erp5_ui_test_core', 'erp5_ui_test', 'erp5_forge', 'erp5_base', 'erp5_ui_test_core', 'erp5_ui_test',
'erp5_dhtml_style', 'erp5_dhtml_ui_test', 'erp5_dhtml_style', 'erp5_dhtml_ui_test',
'erp5_jquery', 'erp5_jquery_ui', 'erp5_jquery', 'erp5_jquery_ui',
'erp5_knowledge_pad', 'erp5_knowledge_pad',
...@@ -62,7 +62,9 @@ class TestZeleniumCore(ERP5TypeFunctionalTestCase): ...@@ -62,7 +62,9 @@ class TestZeleniumCore(ERP5TypeFunctionalTestCase):
'erp5_ingestion_mysql_innodb_catalog', 'erp5_ingestion', 'erp5_ingestion_mysql_innodb_catalog', 'erp5_ingestion',
'erp5_web', 'erp5_dms', 'erp5_dms_ui_test', 'erp5_web', 'erp5_dms', 'erp5_dms_ui_test',
'erp5_knowledge_pad_ui_test', 'erp5_knowledge_pad_ui_test',
'erp5_crm', 'erp5_credential', 'erp5_crm',
'erp5_forge',
'erp5_credential',
'erp5_rss_style', 'erp5_discussion', 'erp5_rss_style', 'erp5_discussion',
'erp5_l10n_fr', 'erp5_l10n_fr',
'erp5_l10n_fa', 'erp5_l10n_fa',
......
...@@ -44,7 +44,7 @@ class TestZeleniumKM(ERP5TypeFunctionalTestCase): ...@@ -44,7 +44,7 @@ class TestZeleniumKM(ERP5TypeFunctionalTestCase):
# XXX This is a rough list, we should drop as much as we can, and # XXX This is a rough list, we should drop as much as we can, and
# keep only minimal # keep only minimal
return ('erp5_core_proxy_field_legacy', 'erp5_full_text_mroonga_catalog', return ('erp5_core_proxy_field_legacy', 'erp5_full_text_mroonga_catalog',
'erp5_base', 'erp5_ui_test_core', 'erp5_ui_test', 'erp5_forge', 'erp5_base', 'erp5_ui_test_core', 'erp5_ui_test',
'erp5_dhtml_style', 'erp5_dhtml_ui_test', 'erp5_dhtml_style', 'erp5_dhtml_ui_test',
'erp5_jquery', 'erp5_jquery_ui', 'erp5_jquery', 'erp5_jquery_ui',
'erp5_knowledge_pad', 'erp5_pdm', 'erp5_knowledge_pad', 'erp5_pdm',
...@@ -57,7 +57,9 @@ class TestZeleniumKM(ERP5TypeFunctionalTestCase): ...@@ -57,7 +57,9 @@ class TestZeleniumKM(ERP5TypeFunctionalTestCase):
'erp5_knowledge_pad_ui_test', 'erp5_knowledge_pad_ui_test',
'erp5_credential', 'erp5_rss_style', 'erp5_discussion', 'erp5_credential', 'erp5_rss_style', 'erp5_discussion',
'erp5_km', 'erp5_km_ui_test_data', 'erp5_km_ui_test', 'erp5_km', 'erp5_km_ui_test_data', 'erp5_km_ui_test',
'erp5_l10n_fr', 'erp5_crm', 'erp5_web_renderjs_ui', 'erp5_l10n_fr', 'erp5_crm',
'erp5_forge',
'erp5_web_renderjs_ui',
'erp5_web_renderjs_ui_test', 'erp5_web_renderjs_ui_test',
) )
......
...@@ -49,7 +49,7 @@ class TestZeleniumStandaloneUserTutorial(ERP5TypeFunctionalTestCase): ...@@ -49,7 +49,7 @@ class TestZeleniumStandaloneUserTutorial(ERP5TypeFunctionalTestCase):
Return the list of business templates. Return the list of business templates.
""" """
return ('erp5_core_proxy_field_legacy', 'erp5_full_text_mroonga_catalog', return ('erp5_core_proxy_field_legacy', 'erp5_full_text_mroonga_catalog',
'erp5_base', 'erp5_ui_test_core', 'erp5_forge', 'erp5_base', 'erp5_ui_test_core',
'erp5_dhtml_style', 'erp5_dhtml_style',
'erp5_jquery', 'erp5_jquery_ui', 'erp5_jquery', 'erp5_jquery_ui',
'erp5_knowledge_pad', 'erp5_pdm', 'erp5_knowledge_pad', 'erp5_pdm',
...@@ -65,7 +65,7 @@ class TestZeleniumStandaloneUserTutorial(ERP5TypeFunctionalTestCase): ...@@ -65,7 +65,7 @@ class TestZeleniumStandaloneUserTutorial(ERP5TypeFunctionalTestCase):
'erp5_ingestion', 'erp5_ingestion_mysql_innodb_catalog', 'erp5_ingestion', 'erp5_ingestion_mysql_innodb_catalog',
'erp5_web', 'erp5_dms', 'erp5_credential', 'erp5_web', 'erp5_dms', 'erp5_credential',
'erp5_rss_style', 'erp5_discussion', 'erp5_rss_style', 'erp5_discussion',
'erp5_l10n_fr', 'erp5_crm', 'erp5_l10n_fr', 'erp5_crm', 'erp5_forge',
'erp5_run_my_doc', 'erp5_run_my_doc',
'erp5_user_tutorial_ui_test', 'erp5_user_tutorial_ui_test',
'erp5_user_tutorial', 'erp5_user_tutorial',
......
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