quality module
bzr revid: mra@tinyerp.com-20090107130753-n0or93qkfcuj96b6
This commit is contained in:
@@ -35,6 +35,7 @@ class quality_test(base_module_quality.abstract_quality_check):
|
||||
self.bool_installed_only = True
|
||||
self.ponderation = 1.0
|
||||
self.result_det = {}
|
||||
self.data_list = []
|
||||
return None
|
||||
|
||||
def run_test(self, cr, uid, module_path):
|
||||
@@ -67,6 +68,7 @@ class quality_test(base_module_quality.abstract_quality_check):
|
||||
temp.append('Exception')
|
||||
ex_count += 1
|
||||
self.result_det[obj] = temp
|
||||
self.data_list.append(self.result_det)
|
||||
self.score = (ok_count + ex_count) and float(ok_count)/float(ok_count + ex_count) or 0.0
|
||||
self.result = self.get_result()
|
||||
self.result_details = self.get_result_details()
|
||||
@@ -79,10 +81,14 @@ This test checks if the module classes are raising exception when calling basic
|
||||
return summary
|
||||
|
||||
def get_result_details(self):
|
||||
header_list = ['method', 'Object Name', 'search()', 'fields_view_get', 'read']
|
||||
detail = "" #"\n===Method Test===\n"
|
||||
header_list = []
|
||||
header_list.append('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-16s \n! %-20s \n! %-16s ')
|
||||
header_list.append('\n|-\n| %s \n| %s \n| %s \n| %s ')
|
||||
header_view = ['Object Name', 'search()', 'fields_view_get', 'read']
|
||||
self.data_list.append(header_view)
|
||||
detail = ""
|
||||
if not self.error:
|
||||
detail += self.format_table(header=header_list, data_list=[self.result_det])
|
||||
detail += self.format_table(header=header_list, data_list=self.data_list)
|
||||
return detail
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
Reference in New Issue
Block a user