Commit 58f45d5d authored by Julien Muchembled's avatar Julien Muchembled

Fix TestERP5Web so that it doesn't publish already published documents.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27850 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c0792f01
......@@ -425,7 +425,6 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional):
portal.portal_categories.publication_section.newContent(portal_type = 'Category',
id = category_id)
web_page_list = []
property_dict = { '01' : dict(language = 'en' , version = "1" , reference = "A"),
'02' : dict(language = 'en' , version = "2" , reference = "B"),
'03' : dict(language = 'en' , version = "3" , reference = "C"),
......@@ -456,6 +455,7 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional):
% (sequence_count)
ZopeTestCase._print(message)
web_page_list = []
for key in sequence:
web_page = self.portal.web_page_module.newContent(
title=key,
......@@ -469,10 +469,10 @@ class TestERP5Web(ERP5TypeTestCase, ZopeTestCase.Functional):
transaction.commit()
self.tic()
# in draft state no documents should belong to this Web Section
# in draft state, no documents should belong to this Web Section
self.assertEqual(0, len(websection.getDocumentValueList()))
# when published all web pages should belong to it
# when published, all web pages should belong to it
for web_page in web_page_list:
web_page.publish()
transaction.commit()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment