diff --git a/document_page_portal/controllers/portal.py b/document_page_portal/controllers/portal.py index 13105c16342..9f77aba6483 100644 --- a/document_page_portal/controllers/portal.py +++ b/document_page_portal/controllers/portal.py @@ -10,14 +10,12 @@ def setUp(self): ) def test_prepare_portal_layout_values(self): - # Test if document_page_count is correctly set in the portal layout values self.document_page_model.create({"name": "Test Page 1", "type": "content"}) response = self.portal_controller()._prepare_portal_layout_values() self.assertIn("document_page_count", response) self.assertEqual(response["document_page_count"], 1) def test_get_archive_groups(self): - # Test if archive groups are correctly retrieved self.document_page_model.create({"name": "Test Page 1", "type": "content"}) domain = [("type", "=", "content")] groups = self.portal_controller()._get_archive_groups("document.page", domain) @@ -25,14 +23,12 @@ def test_get_archive_groups(self): self.assertEqual(groups[0]["name"], "Test Page 1") def test_portal_my_knowledge_document_pages(self): - # Test if the portal route for knowledge document pages works correctly self.document_page_model.create({"name": "Test Page 1", "type": "content"}) response = self.url_open("/my/knowledge/documents/") self.assertEqual(response.status_code, 200) self.assertIn(b"Test Page 1", response.data) def test_document_pages_followup(self): - # Test if the follow-up route for a specific document page works correctly document_page = self.document_page_model.create( {"name": "Test Page 1", "type": "content"} )