Commit c604876e authored by Gabriel Monnerat's avatar Gabriel Monnerat

add more asserts

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45611 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 037ae45b
No related merge requests found
...@@ -160,6 +160,28 @@ class TestUNG(ERP5TypeTestCase): ...@@ -160,6 +160,28 @@ class TestUNG(ERP5TypeTestCase):
self.portal.WebSection_deleteObjectList() self.portal.WebSection_deleteObjectList()
self.stepTic() self.stepTic()
self.assertEquals(len(self.portal.portal_catalog(relative_url=relative_url)), 0) self.assertEquals(len(self.portal.portal_catalog(relative_url=relative_url)), 0)
web_page = self.portal.web_page_module.newContent(portal_type="Web Page")
web_table = self.portal.web_page_module.newContent(portal_type="Web Table")
web_illustration = self.portal.web_page_module.newContent(portal_type="Web Illustration")
web_page.publish()
web_table.publish()
web_illustration.publish()
self.stepTic()
uid_list = [web_page.getUid(),
web_table.getUid(),
web_illustration.getUid()]
self.portal.REQUEST.set("uids", uid_list)
self.portal.web_site_module.ung.WebSection_deleteObjectList()
self.stepTic()
self.assertEquals(web_page.getValidationState(), "deleted")
self.assertEquals(web_table.getValidationState(), "deleted")
self.assertEquals(web_illustration.getValidationState(), "deleted")
self.portal.REQUEST.set("uids", uid_list)
self.portal.web_site_module.ung.WebSection_deleteObjectList()
self.stepTic()
self.assertFalse(uid_list[0] in self.portal.web_page_module.objectIds())
self.assertFalse(uid_list[1] in self.portal.web_page_module.objectIds())
self.assertFalse(uid_list[2] in self.portal.web_page_module.objectIds())
def testERP5Site_userFollowUpWebPage(self): def testERP5Site_userFollowUpWebPage(self):
"""Test if user is added in field Follow Up of Web Page""" """Test if user is added in field Follow Up of Web Page"""
......
363 364
\ No newline at end of file \ No newline at end of file
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