diff --git a/document_page_group/__manifest__.py b/document_page_group/__manifest__.py index e3263c6cba7..c352dcf0961 100644 --- a/document_page_group/__manifest__.py +++ b/document_page_group/__manifest__.py @@ -5,7 +5,7 @@ "name": "Document Page Group", "summary": """ Define access groups on documents""", - "version": "16.0.1.0.1", + "version": "17.0.1.0.0", "license": "AGPL-3", "author": "Creu Blanca,Odoo Community Association (OCA)", "website": "https://github.com/OCA/knowledge", diff --git a/document_page_group/tests/test_document_page_group.py b/document_page_group/tests/test_document_page_group.py index 9bf38a5191b..b2aea7a2aef 100644 --- a/document_page_group/tests/test_document_page_group.py +++ b/document_page_group/tests/test_document_page_group.py @@ -5,10 +5,11 @@ class TestDocumentPageGroup(TransactionCase): - def setUp(self): - super().setUp() - knowledge_group = self.browse_ref("document_knowledge.group_document_user").id - self.user_id = self.env["res.users"].create( + @classmethod + def setUpClass(cls): + super().setUpClass() + knowledge_group = cls.env.ref("document_knowledge.group_document_user").id + cls.user_id = cls.env["res.users"].create( { "name": "user", "login": "login", @@ -16,16 +17,16 @@ def setUp(self): "groups_id": [(4, knowledge_group)], } ) - self.group = self.browse_ref("document_page.group_document_manager") + cls.group = cls.env.ref("document_page.group_document_manager") - self.categ_1 = self.env["document.page"].create( + cls.categ_1 = cls.env["document.page"].create( {"name": "Categ 1", "type": "category"} ) - self.categ_2 = self.env["document.page"].create( - {"name": "Categ 2", "type": "category", "parent_id": self.categ_1.id} + cls.categ_2 = cls.env["document.page"].create( + {"name": "Categ 2", "type": "category", "parent_id": cls.categ_1.id} ) - self.page = self.env["document.page"].create( - {"name": "Page 1", "type": "content", "parent_id": self.categ_1.id} + cls.page = cls.env["document.page"].create( + {"name": "Page 1", "type": "content", "parent_id": cls.categ_1.id} ) def test_document_page_group(self):