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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
87364dde
Commit
87364dde
authored
Sep 28, 2023
by
Titouan Soulard
Committed by
Romain Courteaud
Nov 28, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio_api_style: update Person creation in tests
parent
b75209c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
20 deletions
+14
-20
master/bt5/slapos_jio_api_style/TestTemplateItem/portal_components/test.erp5.testSlapOSJIOAPI.py
...plateItem/portal_components/test.erp5.testSlapOSJIOAPI.py
+14
-20
No files found.
master/bt5/slapos_jio_api_style/TestTemplateItem/portal_components/test.erp5.testSlapOSJIOAPI.py
View file @
87364dde
...
...
@@ -76,22 +76,26 @@ class TestSlapOSJIOAPIMixin(SlapOSTestCaseMixin):
SlapOSTestCaseMixin
.
afterSetUp
(
self
)
self
.
portal_slap
=
self
.
portal
.
portal_slap
self
.
web_site
=
self
.
portal
.
web_site_module
.
hostingjs
# Create project and person
if
getattr
(
self
,
"project"
,
None
)
is
None
:
self
.
project
=
self
.
addProject
()
self
.
_makeTree
(
self
.
project
)
self
.
person
=
self
.
makePerson
(
self
.
project
)
self
.
addProjectProductionManagerAssignment
(
self
.
person
,
self
.
project
)
self
.
commit
()
# Prepare compute_node
self
.
compute_node
=
self
.
portal
.
compute_node_module
.
template_compute_node
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
self
.
compute_node
.
edit
(
title
=
"Compute Node %s"
%
self
.
new_id
,
reference
=
"TESTCOMP-%s"
%
self
.
new_id
)
if
getattr
(
self
,
"person"
,
None
)
is
not
None
:
self
.
compute_node
.
edit
(
source_administration_value
=
getattr
(
self
,
"person"
,
None
),
reference
=
"TESTCOMP-%s"
%
self
.
new_id
,
follow_up_value
=
self
.
project
)
self
.
compute_node
.
validate
()
# Make compute node access
self
.
_addERP5Login
(
self
.
compute_node
)
self
.
tic
()
...
...
@@ -1248,21 +1252,11 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJIOAPIMixin):
class
TestSlapOSSlapToolPersonAccess
(
TestSlapOSJIOAPIMixin
):
def
afterSetUp
(
self
):
password
=
"%s-1Aa$"
%
self
.
generateNewId
()
reference
=
'test_%s'
%
self
.
generateNewId
()
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
title
=
reference
,
reference
=
reference
)
person
.
newContent
(
portal_type
=
'Assignment'
,
role
=
'member'
).
open
()
person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
reference
,
password
=
password
).
validate
()
self
.
commit
()
self
.
person
=
person
self
.
person_reference
=
person
.
getReference
()
self
.
person_user_id
=
person
.
getUserId
()
TestSlapOSJIOAPIMixin
.
afterSetUp
(
self
)
self
.
person_reference
=
self
.
person
.
getReference
()
self
.
person_user_id
=
self
.
person
.
getUserId
()
def
test_30_computerBang
(
self
):
self
.
called_banged_kw
=
""
def
calledBang
(
*
args
,
**
kw
):
...
...
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