Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos.core
Commits
8fc00603
Commit
8fc00603
authored
Dec 27, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: Add additional tests for person_slap_interface_workflow
parent
ffdb9a87
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
493 additions
and
8 deletions
+493
-8
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudPersonSlapInterfaceWorkflow.py
...s/test.erp5.testSlapOSCloudPersonSlapInterfaceWorkflow.py
+488
-1
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_requestOrganisation.py
...p_interface_workflow/script_Person_requestOrganisation.py
+5
-7
No files found.
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudPersonSlapInterfaceWorkflow.py
View file @
8fc00603
This diff is collapsed.
Click to expand it.
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_requestOrganisation.py
View file @
8fc00603
...
...
@@ -21,18 +21,18 @@ if (portal.portal_activities.countMessageWithTag(tag) > 0):
raise
NotImplementedError
(
tag
)
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
,
title
=
organisation_title
,
# check if this works
role_id
=
role_id
,
limit
=
2
)
limit
=
2
)
if
i
.
getRole
()
==
role_id
]
if
len
(
organisation_list
)
==
2
:
raise
NotImplementedError
elif
len
(
organisation_list
)
==
1
:
context
.
REQUEST
.
set
(
"organisation_relative_url"
,
organisation_list
[
0
].
getRelativeUrl
())
context
.
REQUEST
.
set
(
"organisation_reference"
,
organisation_list
[
0
].
getReference
())
else
:
module
=
portal
.
getDefaultModule
(
portal_type
=
organisation_portal_type
)
organisation
=
module
.
newContent
(
...
...
@@ -42,6 +42,4 @@ else:
activate_kw
=
{
'tag'
:
tag
}
)
context
.
REQUEST
.
set
(
"organisation_relative_url"
,
organisation
.
getRelativeUrl
())
context
.
REQUEST
.
set
(
"organisation_reference"
,
organisation
.
getReference
())
organisation
.
approveRegistration
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment