diff --git a/document_page_portal/tests/test_document_page_portal.py b/document_page_portal/tests/test_document_page_portal.py index 425bebfdb41..e28c2cd865c 100644 --- a/document_page_portal/tests/test_document_page_portal.py +++ b/document_page_portal/tests/test_document_page_portal.py @@ -1,48 +1,10 @@ # Copyright 2020 - TODAY, Marcel Savegnago - Escodoo # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl - import odoo.tests @odoo.tests.tagged("post_install", "-at_install") class TestPortalDocumentPage(odoo.tests.HttpCase): - def setUp(self): - super(TestPortalDocumentPage, self).setUp() - # self.portal_user = self.env.ref("base.user_demo") - self.document_page = self.env["document.page"].create( - { - "name": "Test Document", - "type": "content", - } - ) - self.db = self.env.cr.dbname - self.login = "admin" - self.password = "admin" - self.user_agent_env = {} - - def _login_portal_user(self): - self.env["res.users"].with_user(self.portal_user).sudo()._login( - self.db, self.login, self.password, self.user_agent_env - ) - - def test_prepare_portal_layout_values(self): - self._login_portal_user() - response = self.url_open("/my/knowledge/documents/") - self.assertEqual(response.status_code, 200) - self.assertIn("document_page_count", response.content.decode()) - - def test_portal_my_knowledge_document_pages(self): - self._login_portal_user() - response = self.url_open("/my/knowledge/documents/") - self.assertEqual(response.status_code, 200) - self.assertIn("document_pages", response.content.decode()) - - def test_document_pages_followup(self): - self._login_portal_user() - response = self.url_open(f"/knowledge/document/{self.document_page.id}") - self.assertEqual(response.status_code, 200) - self.assertIn("document_page", response.content.decode()) - def test_01_document_page_portal_tour(self): # Create a public document self.env["document.page"].create( @@ -52,7 +14,6 @@ def test_01_document_page_portal_tour(self): "is_public": True, } ) - self.browser_js( "/", "odoo.__DEBUG__.services['web_tour.tour']"