test writed in python

This commit is contained in:
Gervais Naoussi
2015-12-08 13:00:05 +01:00
parent 1c72749157
commit fc556602cd
5 changed files with 71 additions and 55 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding:utf-8 -*-
from openerp.tests import common
class TestDocumentPageCreateMenu(common.TransactionCase):
"""document_page_create_menu test class."""
def test_page_menu_creation(self):
"""Test page menu creation."""
menu_parent = self.env.ref('base.menu_base_partner')
menu_created = self.env['document.page.create.menu'].create({
'menu_name': 'Wiki Test menu',
'menu_parent_id': menu_parent.id
})
menu = self.env['document.page.create.menu'].search([('id', '=', menu_created.id)])
menu.with_context(active_id=[self.ref('document_page.demo_page1')]).document_page_menu_create()