Ensure view arch is defined on test_view

issue8603
review270141003
This commit is contained in:
Sergi Almacellas Abellana committed 2019-09-12 18:54:25 +02:00
1 parent 5e68f7c0ab
commit b60b01c569
1 file changed
+6
+6
View File
@@ -256,6 +256,12 @@ class ModuleTestCase(unittest.TestCase):
('model', '!=', ''),
])
for view in views:
if not view.inherit or view.inherit.model == view.model:
assert view.arch, ('missing architecture for view "%(name)s" '
'of model "%(model)s"' % {
'name': view.name or str(view.id),
'model': view.model,
})
if view.inherit and view.inherit.model == view.model:
view_id = view.inherit.id
else: