Commit 773665fd authored by Alexandre Boeglin's avatar Alexandre Boeglin

Added a method that can run UnitTests from zope.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2278 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 420f81ea
...@@ -214,4 +214,12 @@ class TemplateTool (BaseTool): ...@@ -214,4 +214,12 @@ class TemplateTool (BaseTool):
REQUEST.RESPONSE.redirect("%s?portal_status_message=Business+Template+Imported+Successfully" REQUEST.RESPONSE.redirect("%s?portal_status_message=Business+Template+Imported+Successfully"
% self.absolute_url()) % self.absolute_url())
def runUnitTestList(self, test_list=[], **kwd) :
"""
Runs Unit Tests related to this Business Template
"""
from Products.ERP5Type.tests.runUnitTest import getUnitTestFile
return os.popen('/usr/bin/python %s %s 2>&1' % (getUnitTestFile(), ' '.join(test_list))).read()
InitializeClass(TemplateTool) InitializeClass(TemplateTool)
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