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
21831a16
Commit
21831a16
authored
Oct 20, 2023
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: test: drop test_InternalPackingListLine*
parent
b52f1520
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
189 deletions
+0
-189
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
...testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
+0
-189
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5LocalPermissionSlapOSInteractionWorkflow.py
View file @
21831a16
...
...
@@ -19,7 +19,6 @@
#
##############################################################################
from
erp5.component.test.testSlapOSERP5GroupRoleSecurity
import
TestSlapOSGroupRoleSecurityMixin
from
DateTime
import
DateTime
class
TestSlapOSLocalPermissionSlapOSInteractionWorkflow
(
TestSlapOSGroupRoleSecurityMixin
):
...
...
@@ -127,191 +126,3 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
'G-COMPANY'
,
self
.
person_user
.
getUserId
()],
False
)
def
test_InternalPackingListLine_setAggregate_instance_tree
(
self
):
self
.
_makePerson
()
project
=
self
.
portal
.
project_module
.
newContent
(
portal_type
=
"Project"
,
)
instance_tree
=
self
.
portal
.
instance_tree_module
.
newContent
(
portal_type
=
'Instance Tree'
,
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
internal_packing_list
=
self
.
portal
.
internal_packing_list_module
.
newContent
(
portal_type
=
'Internal Packing List'
)
internal_packing_list_line
=
internal_packing_list
.
newContent
(
portal_type
=
'Internal Packing List Line'
)
internal_packing_list
.
edit
(
source_value
=
self
.
person_user
,
source_section_value
=
self
.
person_user
,
source_project_value
=
project
,
destination
=
self
.
person_user
.
getRelativeUrl
(),
destination_section
=
self
.
person_user
.
getRelativeUrl
(),
source_decision
=
self
.
person_user
.
getRelativeUrl
(),
destination_decision
=
self
.
person_user
.
getRelativeUrl
(),
destination_project_value
=
project
,
start_date
=
DateTime
()
-
1
,
stop_date
=
DateTime
()
-
1
)
internal_packing_list
.
confirm
()
internal_packing_list
.
stop
()
internal_packing_list
.
deliver
()
software_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Software Instance'
)
software_instance
.
edit
(
specialise
=
instance_tree
.
getRelativeUrl
())
slave_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Slave Instance'
)
slave_instance
.
edit
(
specialise
=
instance_tree
.
getRelativeUrl
())
support_request
=
self
.
portal
.
support_request_module
.
newContent
(
portal_type
=
"Support Request"
)
support_request
.
edit
(
aggregate
=
instance_tree
.
getRelativeUrl
())
upgrade_decision
=
self
.
portal
.
upgrade_decision_module
.
newContent
(
portal_type
=
"Upgrade Decision"
)
upgrade_decision_line
=
upgrade_decision
.
newContent
(
portal_type
=
"Upgrade Decision Line"
)
upgrade_decision_line
.
edit
(
aggregate
=
instance_tree
.
getRelativeUrl
())
self
.
tic
()
self
.
assertSecurityGroup
(
internal_packing_list
,
[
self
.
user_id
,],
False
)
self
.
assertSecurityGroup
(
instance_tree
,
[
self
.
user_id
,
'G-COMPANY'
,
instance_tree
.
getReference
()],
False
)
self
.
assertSecurityGroup
(
software_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
instance_tree
.
getReference
()],
False
)
self
.
assertSecurityGroup
(
slave_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
instance_tree
.
getReference
()],
False
)
self
.
assertSecurityGroup
(
support_request
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
self
.
assertSecurityGroup
(
upgrade_decision
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
internal_packing_list_line
.
edit
(
#quantity_unit="unit",
resource_value
=
self
.
portal
.
product_module
.
compute_node
,
price
=
0.0
,
quantity
=
1.0
,
aggregate_value
=
instance_tree
)
self
.
tic
()
self
.
assertSecurityGroup
(
internal_packing_list
,
[
self
.
user_id
,],
False
)
self
.
assertSecurityGroup
(
instance_tree
,
[
self
.
user_id
,
'G-COMPANY'
,
project
.
getReference
(),
instance_tree
.
getReference
()],
False
)
self
.
assertSecurityGroup
(
software_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
project
.
getReference
(),
instance_tree
.
getReference
()],
False
)
self
.
assertSecurityGroup
(
slave_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
project
.
getReference
(),
instance_tree
.
getReference
()],
False
)
self
.
assertSecurityGroup
(
support_request
,
[
self
.
user_id
,
'G-COMPANY'
,
project
.
getReference
()],
False
)
self
.
assertSecurityGroup
(
upgrade_decision
,
[
self
.
user_id
,
'G-COMPANY'
,
project
.
getReference
()],
False
)
def
test_InternalPackingListLine_setAggregate_compute_node
(
self
):
self
.
_makePerson
()
project
=
self
.
portal
.
project_module
.
newContent
(
portal_type
=
"Project"
,
)
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
,
reference
=
'TESTCOMP-%s'
%
self
.
generateNewId
())
internal_packing_list
=
self
.
portal
.
internal_packing_list_module
.
newContent
(
portal_type
=
'Internal Packing List'
)
internal_packing_list_line
=
internal_packing_list
.
newContent
(
portal_type
=
'Internal Packing List Line'
)
internal_packing_list
.
edit
(
source_value
=
self
.
person_user
,
source_section_value
=
self
.
person_user
,
source_project_value
=
project
,
destination
=
self
.
person_user
.
getRelativeUrl
(),
destination_section
=
self
.
person_user
.
getRelativeUrl
(),
source_decision
=
self
.
person_user
.
getRelativeUrl
(),
destination_decision
=
self
.
person_user
.
getRelativeUrl
(),
destination_project_value
=
project
,
start_date
=
DateTime
()
-
1
,
stop_date
=
DateTime
()
-
1
)
internal_packing_list
.
confirm
()
internal_packing_list
.
stop
()
internal_packing_list
.
deliver
()
installation
=
self
.
portal
.
software_installation_module
.
newContent
(
portal_type
=
'Software Installation'
)
installation
.
edit
(
aggregate
=
compute_node
.
getRelativeUrl
())
support_request
=
self
.
portal
.
support_request_module
.
newContent
(
portal_type
=
"Support Request"
)
support_request
.
edit
(
aggregate
=
compute_node
.
getRelativeUrl
())
upgrade_decision
=
self
.
portal
.
upgrade_decision_module
.
newContent
(
portal_type
=
"Upgrade Decision"
)
upgrade_decision_line
=
upgrade_decision
.
newContent
(
portal_type
=
"Upgrade Decision Line"
)
upgrade_decision_line
.
edit
(
aggregate
=
compute_node
.
getRelativeUrl
())
self
.
tic
()
self
.
assertSecurityGroup
(
internal_packing_list
,
[
self
.
user_id
,],
False
)
self
.
assertSecurityGroup
(
compute_node
,
[
self
.
user_id
,
'G-COMPANY'
,
compute_node
.
getUserId
()],
False
)
self
.
assertSecurityGroup
(
installation
,
[
self
.
user_id
,
'G-COMPANY'
,
compute_node
.
getUserId
()],
False
)
self
.
assertSecurityGroup
(
support_request
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
self
.
assertSecurityGroup
(
upgrade_decision
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
internal_packing_list_line
.
edit
(
#quantity_unit="unit",
resource_value
=
self
.
portal
.
product_module
.
compute_node
,
price
=
0.0
,
quantity
=
1.0
,
aggregate_value
=
compute_node
)
self
.
tic
()
self
.
assertSecurityGroup
(
internal_packing_list
,
[
self
.
user_id
,],
False
)
self
.
assertSecurityGroup
(
compute_node
,
[
self
.
user_id
,
'G-COMPANY'
,
project
.
getReference
(),
compute_node
.
getUserId
()],
False
)
self
.
assertSecurityGroup
(
installation
,
[
self
.
user_id
,
'G-COMPANY'
,
project
.
getReference
(),
compute_node
.
getUserId
()],
False
)
self
.
assertSecurityGroup
(
support_request
,
[
self
.
user_id
,
'G-COMPANY'
,
project
.
getReference
()],
False
)
self
.
assertSecurityGroup
(
upgrade_decision
,
[
self
.
user_id
,
'G-COMPANY'
,
project
.
getReference
()],
False
)
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