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

test/CodingStyle:: include erp5_administration's Check Python Code

parent e14b1ba0
...@@ -94,3 +94,17 @@ class CodingStyleTestCase(ERP5TypeTestCase): ...@@ -94,3 +94,17 @@ class CodingStyleTestCase(ERP5TypeTestCase):
# Return results # Return results
if len(message_list): if len(message_list):
raise self.failureException('\n'.join(map(lambda x: repr(x), message_list))) raise self.failureException('\n'.join(map(lambda x: repr(x), message_list)))
def test_PythonSourceCode(self):
"""test python script from the tested business templates.
reuses BusinessTemplate_getPythonSourceCodeMessageList from erp5_administration
"""
if 'erp5_administration' not in self.getBusinessTemplateList():
self.skipTest('erp5_administration needs be installed to check python source code')
self.maxDiff = None
for business_template in self.portal.portal_templates.contentValues():
if business_template.getTitle() in self.getTestedBusinessTemplateList():
self.assertEqual([], business_template.BusinessTemplate_getPythonSourceCodeMessageList())
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