Commit 6ca6a6ba authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Use user id and adjust users.

parent c4d478fa
...@@ -28,19 +28,11 @@ def getRelativeUrlFromUrn(urn): ...@@ -28,19 +28,11 @@ def getRelativeUrlFromUrn(urn):
class TestSlapOSHypermediaPersonScenario(testSlapOSMixin): class TestSlapOSHypermediaPersonScenario(testSlapOSMixin):
def _makeUser(self): def _makeUser(self):
new_id = self.generateNewId() person_user = self.makePerson()
person_user = self.portal.person_module.template_member.\ login = person_user.objectValues("ERP5 Login")[0]
Base_createCloneDocument(batch_mode=1) login.edit(
person_user.edit( reference=person_user.getReference(),
title="live_test_%s" % new_id, password=person_user.getReference())
reference="live_test_%s" % new_id,
password="live_test_%s" % new_id,
default_email_text="live_test_%s@example.org" % new_id,
)
person_user.validate()
for assignment in person_user.contentValues(portal_type="Assignment"):
assignment.open()
self.tic() self.tic()
return person_user return person_user
...@@ -291,7 +283,7 @@ class TestSlapOSHypermediaPersonScenario(testSlapOSMixin): ...@@ -291,7 +283,7 @@ class TestSlapOSHypermediaPersonScenario(testSlapOSMixin):
# We are going to check computer and software # We are going to check computer and software
# First create a computer and a software. We could alternatively later # First create a computer and a software. We could alternatively later
# create them through hypermedia links # create them through hypermedia links
self.login(erp5_person.getReference()) self.login(erp5_person.getUserId())
self.portal.portal_slap.requestComputer( self.portal.portal_slap.requestComputer(
"computer %s" % erp5_person.getReference()) "computer %s" % erp5_person.getReference())
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