[REM] broken tests

weird tests (using broken views, but not just broken in the way the
test expects) were really testing for error on using a field which
does not exist, predicated on full rendering of the view during
validation.

This has been removed from the website branch as it's unfeasible and
nonsensical for model-less views (e.g. qweb), and thus the test blew
up with a completely different error (missing @string) or, once the
test was fixed, wouldn't blow up at all.

bzr revid: xmo@openerp.com-20131211162412-t31bxkpy2yzdnf0q
This commit is contained in:
Xavier Morel 2013-12-11 17:24:12 +01:00
parent 630e9ad64c
commit ebc6ff5256
1 changed files with 0 additions and 33 deletions

View File

@ -431,39 +431,6 @@ class TestNoModel(common.TransactionCase):
class test_views(common.TransactionCase):
@mute_logger('openerp.osv.orm', 'openerp.addons.base.ir.ir_ui_view')
def test_00_init_check_views(self):
Views = self.registry('ir.ui.view')
self.assertTrue(Views.pool._init)
error_msg = "The model name does not exist or the view architecture cannot be rendered"
# test arch check is call for views without xmlid during registry initialization
with self.assertRaisesRegexp(except_orm, error_msg):
Views.create(self.cr, self.uid, {
'name': 'Test View #1',
'model': 'ir.ui.view',
'arch': """<?xml version="1.0"?>
<tree>
<field name="test_1"/>
</tree>
""",
})
# same for inherited views
with self.assertRaisesRegexp(except_orm, error_msg):
# Views.pudb = True
Views.create(self.cr, self.uid, {
'name': 'Test View #2',
'model': 'ir.ui.view',
'inherit_id': self.browse_ref('base.view_view_tree').id,
'arch': """<?xml version="1.0"?>
<xpath expr="//field[@name='name']" position="after">
<field name="test_2"/>
</xpath>
""",
})
def test_20_remove_unexisting_attribute(self):
Views = self.registry('ir.ui.view')
Views.create(self.cr, self.uid, {