[FIX] QWebContext necessary in some tests

bzr revid: xmo@openerp.com-20131014093713-2hawn717pby32pgw
This commit is contained in:
Xavier Morel
2013-10-14 11:37:13 +02:00
parent 2e352ce187
commit ec8ea76a0e
+3 -2
View File
@@ -5,6 +5,7 @@ from xml.dom.minidom import getDOMImplementation
from lxml import html
from openerp.tests import common
from openerp.addons.base.ir import ir_qweb
impl = getDOMImplementation()
document = impl.createDocument(None, None, None)
@@ -27,9 +28,9 @@ class TestConvertBack(common.TransactionCase):
e.setAttribute('t-field', field_value)
rendered = self.registry('website.qweb').render_tag_field(
e, {'field': field_value}, '', {
e, {'field': field_value}, '', ir_qweb.QWebContext({
'record': record,
})
}))
element = html.fromstring(
rendered, parser=html.HTMLParser(encoding='utf-8'))