Commit c4e684f4 authored by Rafael Monnerat's avatar Rafael Monnerat

Create setUp method (like unittest, to call configuration methods). Some...

Create setUp method (like unittest, to call configuration methods). Some projects can have diferent setups, but It is preferred to have same main function.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32329 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4bcdd441
......@@ -51,7 +51,6 @@ bt5_dir_list = ','.join([
os.path.join(instance_home, 'Products/ERP5/bootstrap'),
os.path.join(instance_home, 'bt5')])
class FunctionalTestRunner:
"""
Used to run Functional tests
......@@ -134,10 +133,8 @@ class FunctionalTestRunner:
f.close()
return file_content
def main(self):
self.setPreference()
self.unsubscribeFromTimerService()
self.setUp()
self.launchFuntionalTest()
def launchFuntionalTest(self):
......@@ -272,7 +269,11 @@ user_pref("capability.principal.codebase.p1.subjectName", "");""" % \
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 @@ Following tests failed:
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)
......
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