summaryrefslogtreecommitdiff
path: root/addons/base_module_quality/method_test/method_test.py
diff options
context:
space:
mode:
authorP. Christeas <>2010-09-07 15:20:55 +0530
committerHarry (OpenERP) <hmo@tinyerp.com>2010-09-07 15:20:55 +0530
commit49f8d24d4a77f634125cb2b8c24c0be96e31e33c (patch)
tree8eff1c6d421730ea4f34133b4970ce16d51dbda1 /addons/base_module_quality/method_test/method_test.py
parent389ce144e217e5cfced9fdef48a94d8dd0ff33df (diff)
[FIX]module_quality: trivial logging, multi-addons paths, Fix exceptions, use separate db cursors.
Log some of the exceptions that occur, so that we can understand why our tests fail. Run each test on its own cursor, don't let SQL errors render the whole bzr revid: hmo@tinyerp.com-20100907095055-9sa11rnvir8y7npw
Diffstat (limited to 'addons/base_module_quality/method_test/method_test.py')
-rw-r--r--addons/base_module_quality/method_test/method_test.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/base_module_quality/method_test/method_test.py b/addons/base_module_quality/method_test/method_test.py
index ef4e3f59ea3..2884e064b54 100644
--- a/addons/base_module_quality/method_test/method_test.py
+++ b/addons/base_module_quality/method_test/method_test.py
@@ -53,21 +53,21 @@ This test checks if the module classes are raising exception when calling basic
pool.get(obj).search(cr, uid, [])
temp.append(_('Ok'))
ok_count += 1
- except:
+ except Exception:
temp.append(_('Exception'))
ex_count += 1
try:
pool.get(obj).fields_view_get(cr, uid,)
temp.append(_('Ok'))
ok_count += 1
- except:
+ except Exception:
temp.append(_('Exception'))
ex_count += 1
try:
pool.get(obj).read(cr, uid, [])
temp.append(_('Ok'))
ok_count += 1
- except:
+ except Exception:
temp.append(_('Exception'))
ex_count += 1
result_dict[obj] = temp
@@ -78,6 +78,7 @@ This test checks if the module classes are raising exception when calling basic
return None
def get_result(self, dict_method):
+ # TODO: improve
header = ('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-16s \n! %-20s \n! %-16s ', [_('Object Name'), 'search()', 'fields_view_get()', 'read()'])
detail = ""
if not self.error: