mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-19 11:52:18 -06:00
[MIG] document_page: Migration to 9.0
This commit is contained in:
committed by
FernandoRomera
parent
705b5194a0
commit
e660a86201
30
document_page/tests/test_document_page_create_menu.py
Normal file
30
document_page/tests/test_document_page_create_menu.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# -*- 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()
|
||||
|
||||
fields_list = ["menu_name", "menu_name"]
|
||||
|
||||
res = menu.with_context(
|
||||
active_id=[self.ref('document_page.demo_page1')]
|
||||
).default_get(fields_list)
|
||||
|
||||
self.assertEqual(res['menu_name'], 'OpenERP 6.1. Functional Demo')
|
||||
Reference in New Issue
Block a user