Commit c79153c7 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Add new test

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43921 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9af80110
...@@ -135,9 +135,8 @@ class TestUNGSecurity(ERP5TypeTestCase): ...@@ -135,9 +135,8 @@ class TestUNGSecurity(ERP5TypeTestCase):
assignment.open() assignment.open()
self.stepTic() self.stepTic()
self.logout() self.logout()
self.assertRaises(Unauthorized, self.assertEquals('{"events": []}',
self.portal.Base_updateCalendarEventList, self.portal.Base_updateCalendarEventList("list"))
("list"))
self.login("ung_user") self.login("ung_user")
event_list = json.loads(self.portal.Base_updateCalendarEventList("list")) event_list = json.loads(self.portal.Base_updateCalendarEventList("list"))
self.assertEquals(event_list.get("events"), []) self.assertEquals(event_list.get("events"), [])
...@@ -174,4 +173,17 @@ class TestUNGSecurity(ERP5TypeTestCase): ...@@ -174,4 +173,17 @@ class TestUNGSecurity(ERP5TypeTestCase):
self.stepTic() self.stepTic()
web_message = self.portal.portal_catalog.getResultValue(portal_type="Web Message") web_message = self.portal.portal_catalog.getResultValue(portal_type="Web Message")
self.assertEquals(web_message, None) 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")
17 18
\ 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