Run default and order methods in unittest

issue5432
review24061002
This commit is contained in:
Cédric Krier committed 2016-03-28 22:38:29 +02:00
1 parent 3c6957a14f
commit 576a132a76
1 file changed
+6
+6
View File
@@ -200,6 +200,12 @@ class ModuleTestCase(unittest.TestCase):
'Field method "%s"."%s" for unknown field' % (
mname, attr))
if attr.startswith('default_'):
getattr(model, attr)()
elif attr.startswith('order_'):
tables = {None: (model.__table__(), None)}
getattr(model, attr)(tables)
@with_transaction()
def test_menu_action(self):
'Test that menu actions are accessible to menu\'s group'