From 78c4e7a5a01f6be1353ad0487f6ce103e0688939 Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Tue, 1 Jul 2008 14:43:59 +0000 Subject: [PATCH] Clean up test. Remove incorrect comment. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22169 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testERP5Web.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/product/ERP5/tests/testERP5Web.py b/product/ERP5/tests/testERP5Web.py index 94abeca023..ff458c7605 100644 --- a/product/ERP5/tests/testERP5Web.py +++ b/product/ERP5/tests/testERP5Web.py @@ -532,11 +532,11 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional): def test_11_WebSection_getDocumentValueList(self, quiet=quiet, run=run_all_test): """ Check getting getDocumentValueList from Web Section. - XXX: 01.07.2008 (Ivan) this test will fail as currently there are some missing features. """ if not run: return if not quiet: - message = '\nWebSection_getDocumentValueList' + message = '\ntest_11_WebSection_getDocumentValueList' + ZopeTestCase._print(message) portal = self.getPortal() website = self.setupWebSite() websection = self.setupWebSection() @@ -546,7 +546,10 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional): websection.edit(membership_criterion_base_category = ['publication_section'], membership_criterion_category=['publication_section/%s' %publication_section_category_id_list[0]]) - + # clean up + self.web_page_module.manage_delObjects(list(self.web_page_module.objectIds())) + portal.portal_categories.publication_section.manage_delObjects( + list(portal.portal_categories.publication_section.objectIds())) # create categories for category_id in publication_section_category_id_list: portal.portal_categories.publication_section.newContent(portal_type = 'Category', @@ -573,7 +576,8 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional): self.assertEqual(len(web_page_list), len(websection.getDocumentValueList())) # test if limit works - self.assertEqual(1, len(websection.getDocumentValueList(limit=1))) + self.assertEqual(5, len(websection.getDocumentValueList(limit=5))) + class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase): """ -- 2.30.9