[Erp5-report] r43868 gabriel - in /erp5/trunk/bt5/erp5_web_ung_role: TestTemplateItem/ bt/
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Mar 1 21:12:43 CET 2011
Author: gabriel
Date: Tue Mar 1 21:12:43 2011
New Revision: 43868
URL: http://svn.erp5.org?rev=43868&view=rev
Log:
continuation of r43867. Add test
Modified:
erp5/trunk/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py
erp5/trunk/bt5/erp5_web_ung_role/bt/revision
Modified: erp5/trunk/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py?rev=43868&r1=43867&r2=43868&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py [utf8] Tue Mar 1 21:12:43 2011
@@ -64,9 +64,28 @@ class TestUNGSecurity(ERP5TypeTestCase):
'erp5_web_ung_theme',
'erp5_web_ung_role')
- def testERP5Site_createNewWebDocumentAsAnnonymous(self):
- """ """
+ def testERP5Site_createNewWebDocumentAsAnonymous(self):
+ """Test use script ERP5Site_createNewWebDocument as Anonymous User"""
self.logout()
self.assertRaises(Unauthorized,
self.portal.ERP5Site_createNewWebDocument,
- ("web_page_template"))
\ No newline at end of file
+ ("web_page_template"))
+
+ def testERP5Site_createNewWebDocumentWithUNGRole(self):
+ """Test use script ERP5Site_createNewWebDocument when a erp5 user have role
+ to create and edit document in UNG"""
+ self.portal.portal_preferences.ung_preference.enable()
+ person = self.portal.person_module.newContent(portal_type='Person',
+ reference="ung_user")
+ assignment = person.newContent(portal_type='Assignment')
+ assignment.setFunction("function/ung_user")
+ assignment.open()
+ self.stepTic()
+ self.login("ung_user")
+ web_page = self.portal.portal_catalog.getResultValue(portal_type="Web Page")
+ self.assertEquals(web_page, None)
+ web_page = self.portal.ERP5Site_createNewWebDocument("web_page_template")
+ self.stepTic()
+ web_page = self.portal.portal_catalog.getResultValue(portal_type="Web Page")
+ self.assertEquals(web_page.getReference(), "default-Web.Page.Reference")
+ self.assertEquals(len(self.portal.web_page_module.searchFolder()), 1)
\ No newline at end of file
Modified: erp5/trunk/bt5/erp5_web_ung_role/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_role/bt/revision?rev=43868&r1=43867&r2=43868&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_role/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ung_role/bt/revision [utf8] Tue Mar 1 21:12:43 2011
@@ -1 +1 @@
-11
\ No newline at end of file
+12
\ No newline at end of file
More information about the Erp5-report
mailing list