Skip to content

Commit bc8c59f

Browse files
author
Antoni Marroig Campomar
committed
[MIG] document_page_group: Migration to 17.0
1 parent 05ea367 commit bc8c59f

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

document_page_group/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Document Page Group",
66
"summary": """
77
Define access groups on documents""",
8-
"version": "16.0.1.0.1",
8+
"version": "17.0.1.0.0",
99
"license": "AGPL-3",
1010
"author": "Creu Blanca,Odoo Community Association (OCA)",
1111
"website": "https://github.com/OCA/knowledge",

document_page_group/tests/test_document_page_group.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,28 @@
55

66

77
class TestDocumentPageGroup(TransactionCase):
8-
def setUp(self):
9-
super().setUp()
10-
knowledge_group = self.browse_ref("document_knowledge.group_document_user").id
11-
self.user_id = self.env["res.users"].create(
8+
@classmethod
9+
def setUpClass(cls):
10+
super().setUpClass()
11+
knowledge_group = cls.env.ref("document_knowledge.group_document_user").id
12+
cls.user_id = cls.env["res.users"].create(
1213
{
1314
"name": "user",
1415
"login": "login",
1516
"email": "email",
1617
"groups_id": [(4, knowledge_group)],
1718
}
1819
)
19-
self.group = self.browse_ref("document_page.group_document_manager")
20+
cls.group = cls.env.ref("document_page.group_document_manager")
2021

21-
self.categ_1 = self.env["document.page"].create(
22+
cls.categ_1 = cls.env["document.page"].create(
2223
{"name": "Categ 1", "type": "category"}
2324
)
24-
self.categ_2 = self.env["document.page"].create(
25-
{"name": "Categ 2", "type": "category", "parent_id": self.categ_1.id}
25+
cls.categ_2 = cls.env["document.page"].create(
26+
{"name": "Categ 2", "type": "category", "parent_id": cls.categ_1.id}
2627
)
27-
self.page = self.env["document.page"].create(
28-
{"name": "Page 1", "type": "content", "parent_id": self.categ_1.id}
28+
cls.page = cls.env["document.page"].create(
29+
{"name": "Page 1", "type": "content", "parent_id": cls.categ_1.id}
2930
)
3031

3132
def test_document_page_group(self):

0 commit comments

Comments
 (0)