Commit b07f81a0 authored by Jérome Perrin's avatar Jérome Perrin

fix some other randomness of testUNG

parent 1534ac05
...@@ -338,7 +338,8 @@ class TestUNG(ERP5TypeTestCase): ...@@ -338,7 +338,8 @@ class TestUNG(ERP5TypeTestCase):
self.tic() self.tic()
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)
note = self.portal.portal_catalog.getResultValue(portal_type="Note") note = self.portal.portal_catalog.getResultValue(portal_type="Note",
title="Buy Coffee")
self.assertEquals(note.getTitle(), "Buy Coffee") self.assertEquals(note.getTitle(), "Buy Coffee")
self.portal.REQUEST.form.clear() self.portal.REQUEST.form.clear()
form_dict = dict(title=note.getTitle(), form_dict = dict(title=note.getTitle(),
...@@ -399,12 +400,12 @@ class TestUNG(ERP5TypeTestCase): ...@@ -399,12 +400,12 @@ class TestUNG(ERP5TypeTestCase):
self.assertTrue(response) self.assertTrue(response)
self.tic() self.tic()
person = self.portal.portal_catalog.getResultValue(portal_type="Person", person = self.portal.portal_catalog.getResultValue(portal_type="Person",
first_name="UNG") reference="ung_user")
self.assertEquals(person.getFirstName(), "UNG")
self.assertEquals(person.getLastName(), "User") self.assertEquals(person.getLastName(), "User")
self.assertEquals(person.getValidationState(), "validated") self.assertEquals(person.getValidationState(), "validated")
self.assertEquals(person.getEmail().getPortalType(), "Email") self.assertEquals(person.getEmail().getPortalType(), "Email")
self.assertEquals(person.getEmailText(), "g@g.com") self.assertEquals(person.getEmailText(), "g@g.com")
self.assertEquals(person.getReference(), "ung_user")
self.changeSkin("UNGDoc") self.changeSkin("UNGDoc")
response = json.loads(self.portal.ERPSite_createUNGUser()) response = json.loads(self.portal.ERPSite_createUNGUser())
self.assertEquals(response, None) self.assertEquals(response, None)
......
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