Commit 6467c1f3 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

test: create ERP5 Login instead of putting password in Person.

parent 233d85da
...@@ -498,12 +498,8 @@ class TestUserManagementExternalAuthentication(TestUserManagement): ...@@ -498,12 +498,8 @@ class TestUserManagementExternalAuthentication(TestUserManagement):
""" """
reference = 'external_auth_person' reference = 'external_auth_person'
loginable_person = self.getPersonModule().newContent(portal_type='Person', loginable_person = self._makePerson(reference=reference,
reference=reference,
password='guest') password='guest')
assignment = loginable_person.newContent(portal_type='Assignment')
assignment.open()
self.tic()
base_url = self.portal.absolute_url(relative=1) base_url = self.portal.absolute_url(relative=1)
...@@ -567,13 +563,15 @@ class TestLocalRoleManagement(ERP5TypeTestCase): ...@@ -567,13 +563,15 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
self.username = 'usérn@me' self.username = 'usérn@me'
# create a user and open an assignement # create a user and open an assignement
pers = self.getPersonModule().newContent(portal_type='Person', pers = self.getPersonModule().newContent(portal_type='Person',
reference=self.username, reference=self.username)
password=self.username)
assignment = pers.newContent( portal_type='Assignment', assignment = pers.newContent( portal_type='Assignment',
group='subcat', group='subcat',
site='subcat', site='subcat',
function='subcat' ) function='subcat' )
assignment.open() assignment.open()
pers.newContent(portal_type='ERP5 Login',
reference=self.username,
password=self.username).validate()
self.person = pers self.person = pers
self.tic() self.tic()
......
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