diff --git a/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py b/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py index 7ec9983869bbd1f6666b61436d69641064babc43..40e270d758aa74764d47b7dd79b793ca6952b29a 100644 --- a/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py +++ b/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py @@ -135,9 +135,8 @@ class TestUNGSecurity(ERP5TypeTestCase): assignment.open() self.stepTic() self.logout() - self.assertRaises(Unauthorized, - self.portal.Base_updateCalendarEventList, - ("list")) + self.assertEquals('{"events": []}', + self.portal.Base_updateCalendarEventList("list")) self.login("ung_user") event_list = json.loads(self.portal.Base_updateCalendarEventList("list")) self.assertEquals(event_list.get("events"), []) @@ -174,4 +173,17 @@ class TestUNGSecurity(ERP5TypeTestCase): self.stepTic() web_message = self.portal.portal_catalog.getResultValue(portal_type="Web Message") self.assertEquals(web_message, None) - \ No newline at end of file + + def testERPSite_createUNGUser(self): + """Test if is possible create one user as Anonymous user""" + self.logout() + form_dict = dict(firstname="My First Name", + lastname="My Last Name", + password="ung_password") + self.portal.REQUEST.form.update(form_dict) + self.portal.ERPSite_createUNGUser() + self.stepTic() + self.login("ERP5TypeTestCase") + person = self.portal.portal_catalog.getResultValue(portal_type="Person") + self.assertEquals(person.getLastName(), "My Last Name") + self.assertEquals(person.getValidationState(), "validated") diff --git a/bt5/erp5_web_ung_role/bt/revision b/bt5/erp5_web_ung_role/bt/revision index 8e2afd342773582f9484b796cdc0b84736e8194e..25bf17fc5aaabd17402e77a2b16f95fbea7310d2 100644 --- a/bt5/erp5_web_ung_role/bt/revision +++ b/bt5/erp5_web_ung_role/bt/revision @@ -1 +1 @@ -17 \ No newline at end of file +18 \ No newline at end of file