'Test if translations work correctly without a model'

def test_qweb_translation(self):

    self.env['res.lang'].load_lang('fr_FR')
    ARCH = '<template    name="foo">%s</template>'
    TEXT_EN = 'Copyright    copyrighter'
    TEXT_FR = u'Copyrighter,    tous    droits    r\xe9serv\xe9s'
    view = self.View.create({'name': 'dummy', 'arch': (ARCH % TEXT_EN), 'inherit_id': False, 'type': 'qweb'})
    self.env['ir.translation'].create({'type': 'model', 'name': 'ir.ui.view,arch_db', 'res_id': view.id, 'lang': 'fr_FR', 'src': TEXT_EN, 'value': TEXT_FR})
    view = view.with_context(lang='fr_FR')
    self.assertEqual(view.arch, (ARCH % TEXT_FR))
