[Erp5-report] r32329 rafael - /erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Feb 8 18:48:44 CET 2010
Author: rafael
Date: Mon Feb 8 18:48:44 2010
New Revision: 32329
URL: http://svn.erp5.org?rev=32329&view=rev
Log:
Create setUp method (like unittest, to call configuration methods). Some projects can have diferent setups, but It is preferred to have same main function.
Modified:
erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py
Modified: erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py?rev=32329&r1=32328&r2=32329&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/runFunctionalTest.py [utf8] Mon Feb 8 18:48:44 2010
@@ -50,7 +50,6 @@
bt5_dir_list = ','.join([
os.path.join(instance_home, 'Products/ERP5/bootstrap'),
os.path.join(instance_home, 'bt5')])
-
class FunctionalTestRunner:
"""
@@ -134,10 +133,8 @@
f.close()
return file_content
-
def main(self):
- self.setPreference()
- self.unsubscribeFromTimerService()
+ self.setUp()
self.launchFuntionalTest()
def launchFuntionalTest(self):
@@ -272,7 +269,11 @@
urllib2.urlopen('%s/portal_activities/?unsubscribe:method='
'&__ac_name=%s&__ac_password=%s' %
(self.portal_url, self.user, self.password))
-
+
+ def setUp(self):
+ self.setPreference()
+ self.unsubscribeFromTimerService()
+
def sendResult(self):
result_uri = urllib2.urlopen('%s/portal_tests/TestTool_getResults' % self.portal_url).readline()
print result_uri
@@ -309,8 +310,10 @@
if error_result_re.match(e):
detail += e
detail = image_re.sub('', detail)
- detail = detail.replace('<tr class="title status_failed"', '<tr class="title status_failed" style="background-color:red"')
- detail = detail.replace('<tr class="status_failed"', '<tr class="status_failed" style="background-color:red"')
+ detail = detail.replace('<tr class="title status_failed"',
+ '<tr class="title status_failed" style="background-color:red"')
+ detail = detail.replace('<tr class="status_failed"',
+ '<tr class="status_failed" style="background-color:red"')
if detail:
detail = '<html><body>%s</body></html>' % detail
status = (not failures)
More information about the Erp5-report
mailing list