Commit b720711c authored by Jérome Perrin's avatar Jérome Perrin

test/CodingStyle: document/cleanup a bit CodingStyleTestCase

* explain how to use
* remove useless getTitle method
* fix indentation
parent 9b031bd2
...@@ -32,18 +32,16 @@ from Testing import ZopeTestCase ...@@ -32,18 +32,16 @@ from Testing import ZopeTestCase
from Acquisition import aq_base from Acquisition import aq_base
class CodingStyleTestCase(ERP5TypeTestCase): class CodingStyleTestCase(ERP5TypeTestCase):
"""XXX """Test case to test coding style in business templates.
Subclasses must override:
* getBusinessTemplateList to list business template to install.
* getTestedBusinessTemplateList to list business templates to test.
""" """
manager_username = 'zope' manager_username = 'zope'
manager_password = 'zope' manager_password = 'zope'
website_id = 'test' website_id = 'test'
def getTitle(self):
"""
Override this method in implementation class.
"""
raise NotImplementedError
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
""" """
Return the list of required business templates. Return the list of required business templates.
...@@ -89,7 +87,7 @@ class CodingStyleTestCase(ERP5TypeTestCase): ...@@ -89,7 +87,7 @@ class CodingStyleTestCase(ERP5TypeTestCase):
skin = portal_skins[skin_id] skin = portal_skins[skin_id]
for document in skin.objectValues(): for document in skin.objectValues():
if getattr(aq_base(document), 'checkConsistency', None) is not None: if getattr(aq_base(document), 'checkConsistency', None) is not None:
message_list.extend(document.checkConsistency()) message_list.extend(document.checkConsistency())
# Return results # Return results
if len(message_list): if len(message_list):
......
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