Add generic test for field function searcher and domain field method
This commit is contained in:
1 parent
704aaf01de
commit
5d82f65fd8
1 file changed
+5
@@ -501,6 +501,8 @@ class ModuleTestCase(unittest.TestCase):
|
||||
getattr(model, attr)()
|
||||
elif attr.startswith('order_'):
|
||||
model.search([], order=[(attr[len('order_'):], None)])
|
||||
elif attr.startswith('domain_'):
|
||||
model.search([(attr[len('domain_'):], '=', None)])
|
||||
elif any(attr.startswith(p) for p in [
|
||||
'on_change_',
|
||||
'on_change_with_',
|
||||
@@ -759,6 +761,9 @@ class ModuleTestCase(unittest.TestCase):
|
||||
'model': model.__name__,
|
||||
'field': field_name,
|
||||
})
|
||||
if func_name == field.searcher:
|
||||
getattr(model, field.searcher)(
|
||||
field_name, (field_name, '=', None))
|
||||
|
||||
@with_transaction()
|
||||
def test_ir_action_window(self):
|
||||
|
||||
Reference in new issue
Block a user