Commit 8fc00603 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Add additional tests for person_slap_interface_workflow

parent ffdb9a87
...@@ -21,18 +21,18 @@ if (portal.portal_activities.countMessageWithTag(tag) > 0): ...@@ -21,18 +21,18 @@ if (portal.portal_activities.countMessageWithTag(tag) > 0):
raise NotImplementedError(tag) raise NotImplementedError(tag)
organisation_portal_type = "Organisation" organisation_portal_type = "Organisation"
organisation_list = portal.portal_catalog.portal_catalog( if role_id not in ["client", "host"]:
raise NotImplementedError
organisation_list = [ i for i in portal.portal_catalog.portal_catalog(
portal_type=organisation_portal_type, portal_type=organisation_portal_type,
title=organisation_title, title=organisation_title,
# check if this works limit=2) if i.getRole() == role_id]
role_id=role_id,
limit=2)
if len(organisation_list) == 2: if len(organisation_list) == 2:
raise NotImplementedError raise NotImplementedError
elif len(organisation_list) == 1: elif len(organisation_list) == 1:
context.REQUEST.set("organisation_relative_url", organisation_list[0].getRelativeUrl()) context.REQUEST.set("organisation_relative_url", organisation_list[0].getRelativeUrl())
context.REQUEST.set("organisation_reference", organisation_list[0].getReference())
else: else:
module = portal.getDefaultModule(portal_type=organisation_portal_type) module = portal.getDefaultModule(portal_type=organisation_portal_type)
organisation = module.newContent( organisation = module.newContent(
...@@ -42,6 +42,4 @@ else: ...@@ -42,6 +42,4 @@ else:
activate_kw={'tag': tag} activate_kw={'tag': tag}
) )
context.REQUEST.set("organisation_relative_url", organisation.getRelativeUrl()) context.REQUEST.set("organisation_relative_url", organisation.getRelativeUrl())
context.REQUEST.set("organisation_reference", organisation.getReference())
organisation.approveRegistration() organisation.approveRegistration()
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