Commit 6bd1d97c authored by Jérome Perrin's avatar Jérome Perrin

title was not set correctly on Tools.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9806 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 980b3907
......@@ -1834,6 +1834,10 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
sequence.edit(dependency_bt=template)
# tests
def test_Title(self):
"""Tests the Title of the Template Tool."""
self.assertEquals('Template Tool', self.getTemplateTool().Title())
def test_01_checkNewSite(self, quiet=quiet, run=run_all_test):
if not run: return
if not quiet:
......
......@@ -96,6 +96,11 @@ class TestPreferences(ERP5TypeTestCase):
self.assertEquals(group.getPreferenceState(), 'disabled')
self.assertEquals(site.getPreferenceState(), 'disabled')
def test_PreferenceToolTitle(self):
"""Tests that the title of the preference tool is correct.
"""
self.assertEquals('Preferences', self.getPreferenceTool().Title())
def test_AllowedContentTypes(self, quiet=quiet, run=run_all_tests):
"""Tests Preference can be added in Preference Tool.
"""
......
......@@ -60,7 +60,8 @@ class BaseTool (UniqueObject, Folder):
# Filter content (ZMI))
def __init__(self):
return Folder.__init__(self, self.__class__.id)
return Folder.__init__(self, self.__class__.id,
getattr(self.__class__, 'title', ''))
# Filter content (ZMI))
def filtered_meta_types(self, user=None):
......
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