[FIX] temporarily remove _init flag of pooler during view inheritance test

Breaks between in-loading (openerp) and unit test (oe), behavior is
crap and can't be arsed to create a dummy ir.model.data for that.

bzr revid: xmo@openerp.com-20130422140116-g8mqzvahbv2ag956
This commit is contained in:
Xavier Morel 2013-04-22 16:01:16 +02:00
parent edf1f23a6e
commit 480bf6a99b
1 changed files with 6 additions and 0 deletions

View File

@ -113,6 +113,8 @@ class TestViewInheritance(common.TransactionCase):
self.model = 'dummy'
self.View = self.registry('ir.ui.view')
self._init = self.View.pool._init
self.View.pool._init = False
self.ids = {}
a = self.makeView("A")
@ -125,6 +127,10 @@ class TestViewInheritance(common.TransactionCase):
a22 = self.makeView("A22", a2)
self.makeView("A221", a22)
def tearDown(self):
self.View.pool._init = self._init
super(TestViewInheritance, self).tearDown()
def test_get_children(self):
self.assertEqual(self.View.get_inheriting_views_arch(
self.cr, self.uid, self.ids['A'], self.model), [