1 parent
9b6ea0ae6a
commit
ee76d45fd8
1 file changed
+14
@@ -1104,6 +1104,20 @@ class ModuleTestCase(_DBTestCase):
|
||||
'keys': set(states) - keys,
|
||||
})
|
||||
|
||||
@with_transaction()
|
||||
def test_button_methods(self):
|
||||
"Test button methods without records"
|
||||
for mname, model in Pool().iterobject():
|
||||
if not isregisteredby(model, self.module):
|
||||
continue
|
||||
if not issubclass(model, ModelView):
|
||||
continue
|
||||
for button in model._buttons:
|
||||
if is_instance_method(model, button):
|
||||
getattr(model(), button)()
|
||||
else:
|
||||
getattr(model, button)([])
|
||||
|
||||
@with_transaction()
|
||||
def test_xml_files(self):
|
||||
"Test validity of the xml files of the module"
|
||||
|
||||
Reference in new issue
Block a user