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
730c1d1f
Commit
730c1d1f
authored
Oct 04, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: drop tests from dropped scripts
parent
1a8d4dc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
415 deletions
+0
-415
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCoreSkins.py
...teItem/portal_components/test.erp5.testSlapOSCoreSkins.py
+0
-415
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCoreSkins.py
View file @
730c1d1f
...
...
@@ -367,418 +367,3 @@ class TestSoftwareInstance_getSecurityCategoryFromMovementSpecialiseDestination(
self
.
portal
.
SoftwareInstance_getSecurityCategoryFromMovementSpecialiseDestination
(
[
"destination_section"
,
"destination_project"
],
None
,
instance
,
None
))
class
TestItem_getSecurityCategoryFromMovementDestination
(
TestSlapOSCoreMixin
):
def
test
(
self
):
person
=
self
.
createPerson
()
node
=
self
.
createComputeNode
(
person
)
org
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
self
.
tic
()
self
.
login
(
person
.
getUserId
())
node
.
requestTransfer
(
destination_project
=
None
,
destination_section
=
None
,
destination
=
org
.
getRelativeUrl
())
self
.
login
()
self
.
tic
()
self
.
assertEqual
([],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestination
(
[],
None
,
None
,
None
))
self
.
assertEqual
([{
'destination'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestination
(
[],
None
,
node
,
None
))
self
.
assertEqual
([{
'destination'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestination
(
[
"destination_section"
],
None
,
node
,
None
))
self
.
assertEqual
([{
'destination'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestination
(
[
"destination"
],
None
,
node
,
None
))
self
.
assertEqual
([{
'destination'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestination
(
[
"destination_section"
,
"destination_project"
],
None
,
node
,
None
))
class
TestItem_getSecurityCategoryFromMovementDestinationSection
(
TestSlapOSCoreMixin
):
def
test
(
self
):
person
=
self
.
createPerson
()
node
=
self
.
createComputeNode
(
person
)
org
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
self
.
tic
()
self
.
login
(
person
.
getUserId
())
node
.
requestTransfer
(
destination_project
=
None
,
destination
=
org
.
getRelativeUrl
(),
destination_section
=
org
.
getRelativeUrl
())
self
.
login
()
self
.
tic
()
self
.
assertEqual
([],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestinationSection
(
[],
None
,
None
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestinationSection
(
[],
None
,
node
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestinationSection
(
[
"destination_section"
],
None
,
node
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestinationSection
(
[
"destination"
],
None
,
node
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestinationSection
(
[
"destination_section"
,
"destination_project"
],
None
,
node
,
None
))
class
TestItem_getSecurityCategoryFromMovementDestinationProject
(
TestSlapOSCoreMixin
):
def
test
(
self
):
person
=
self
.
createPerson
()
node
=
self
.
createComputeNode
(
person
)
org
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
project
=
self
.
portal
.
project_module
.
newContent
(
portal_type
=
'Project'
)
self
.
tic
()
self
.
login
(
person
.
getUserId
())
node
.
requestTransfer
(
destination_project
=
project
.
getRelativeUrl
(),
destination
=
org
.
getRelativeUrl
(),
destination_section
=
None
)
self
.
login
()
self
.
tic
()
self
.
assertEqual
([],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestinationProject
(
[],
None
,
None
,
None
))
self
.
assertEqual
([{
'destination_project'
:
[
project
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestinationProject
(
[],
None
,
node
,
None
))
self
.
assertEqual
([{
'destination_project'
:
[
project
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestinationProject
(
[
"destination_section"
],
None
,
node
,
None
))
self
.
assertEqual
([{
'destination_project'
:
[
project
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestinationProject
(
[
"destination"
],
None
,
node
,
None
))
self
.
assertEqual
([{
'destination_project'
:
[
project
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementDestinationProject
(
[
"destination_section"
,
"destination_project"
],
None
,
node
,
None
))
class
TestItem_getSecurityCategoryFromMovementLineAggregateDestination
(
TestSlapOSCoreMixin
):
def
test
(
self
):
person
=
self
.
createPerson
()
instance_tree
=
self
.
createInstanceTree
(
person
)
ud
=
self
.
portal
.
upgrade_decision_module
.
newContent
(
portal_type
=
"Upgrade Decision"
)
ud
.
newContent
(
portal_type
=
"Upgrade Decision Line"
,
aggregate
=
instance_tree
.
getRelativeUrl
())
org
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
self
.
tic
()
self
.
login
(
person
.
getUserId
())
instance_tree
.
requestTransfer
(
destination_project
=
None
,
destination_section
=
None
,
destination
=
org
.
getRelativeUrl
())
self
.
login
()
self
.
tic
()
self
.
assertEqual
([],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateDestination
(
[],
None
,
None
,
None
))
self
.
assertEqual
([{
'destination'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateDestination
(
[],
None
,
ud
,
None
))
self
.
assertEqual
([{
'destination'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateDestination
(
[
"destination_section"
],
None
,
ud
,
None
))
self
.
assertEqual
([{
'destination'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateDestination
(
[
"destination"
],
None
,
ud
,
None
))
self
.
assertEqual
([{
'destination'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateDestination
(
[
"destination_section"
,
"destination_project"
],
None
,
ud
,
None
))
class
TestItem_getSecurityCategoryFromMovementLineAggregateComputeNodeDestinationSection
(
TestSlapOSCoreMixin
):
def
test
(
self
):
person
=
self
.
createPerson
()
node
=
self
.
createComputeNode
(
person
)
ud
=
self
.
portal
.
upgrade_decision_module
.
newContent
(
portal_type
=
"Upgrade Decision"
)
ud
.
newContent
(
portal_type
=
"Upgrade Decision Line"
,
aggregate
=
node
.
getRelativeUrl
())
org
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
self
.
tic
()
self
.
login
(
person
.
getUserId
())
node
.
requestTransfer
(
destination_project
=
None
,
destination
=
org
.
getRelativeUrl
(),
destination_section
=
org
.
getRelativeUrl
())
self
.
login
()
self
.
tic
()
self
.
assertEqual
([],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateComputeNodeDestinationSection
(
[],
None
,
None
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateComputeNodeDestinationSection
(
[],
None
,
ud
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateComputeNodeDestinationSection
(
[
"destination_section"
],
None
,
ud
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateComputeNodeDestinationSection
(
[
"destination"
],
None
,
ud
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateComputeNodeDestinationSection
(
[
"destination_section"
,
"destination_project"
],
None
,
ud
,
None
))
class
TestItem_getSecurityCategoryFromMovementLineAggregateDestinationProject
(
TestSlapOSCoreMixin
):
def
test
(
self
):
person
=
self
.
createPerson
()
node
=
self
.
createComputeNode
(
person
)
ud
=
self
.
portal
.
upgrade_decision_module
.
newContent
(
portal_type
=
"Upgrade Decision"
)
ud
.
newContent
(
portal_type
=
"Upgrade Decision Line"
,
aggregate
=
node
.
getRelativeUrl
())
org
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
project
=
self
.
portal
.
project_module
.
newContent
(
portal_type
=
'Project'
)
self
.
tic
()
self
.
login
(
person
.
getUserId
())
node
.
requestTransfer
(
destination_project
=
project
.
getRelativeUrl
(),
destination
=
org
.
getRelativeUrl
(),
destination_section
=
None
)
self
.
login
()
self
.
tic
()
self
.
assertEqual
([],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateDestinationProject
(
[],
None
,
None
,
None
))
self
.
assertEqual
([{
'destination_project'
:
[
project
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateDestinationProject
(
[],
None
,
ud
,
None
))
self
.
assertEqual
([{
'destination_project'
:
[
project
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateDestinationProject
(
[
"destination_section"
],
None
,
ud
,
None
))
self
.
assertEqual
([{
'destination_project'
:
[
project
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateDestinationProject
(
[
"destination"
],
None
,
ud
,
None
))
self
.
assertEqual
([{
'destination_project'
:
[
project
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementLineAggregateDestinationProject
(
[
"destination_section"
,
"destination_project"
],
None
,
ud
,
None
))
class
TestItem_getSecurityCategoryFromMovementAggregateDestination
(
TestSlapOSCoreMixin
):
def
test
(
self
):
person
=
self
.
createPerson
()
instance_tree
=
self
.
createInstanceTree
(
person
)
support
=
self
.
portal
.
support_request_module
.
newContent
(
portal_type
=
"Support Request"
,
aggregate
=
instance_tree
.
getRelativeUrl
()
)
org
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
self
.
tic
()
self
.
login
(
person
.
getUserId
())
instance_tree
.
requestTransfer
(
destination_project
=
None
,
destination_section
=
None
,
destination
=
org
.
getRelativeUrl
())
self
.
login
()
self
.
tic
()
self
.
assertEqual
([],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestination
(
[],
None
,
None
,
None
))
self
.
assertEqual
([{
'destination'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestination
(
[],
None
,
support
,
None
))
self
.
assertEqual
([{
'destination'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestination
(
[
"destination_section"
],
None
,
support
,
None
))
self
.
assertEqual
([{
'destination'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestination
(
[
"destination"
],
None
,
support
,
None
))
self
.
assertEqual
([{
'destination'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestination
(
[
"destination_section"
,
"destination_project"
],
None
,
support
,
None
))
class
TestItem_getSecurityCategoryFromMovementAggregateDestinationSection
(
TestSlapOSCoreMixin
):
def
test
(
self
):
person
=
self
.
createPerson
()
node
=
self
.
createComputeNode
(
person
)
support
=
self
.
portal
.
support_request_module
.
newContent
(
portal_type
=
"Support Request"
,
aggregate
=
node
.
getRelativeUrl
()
)
org
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
self
.
tic
()
self
.
login
(
person
.
getUserId
())
node
.
requestTransfer
(
destination_project
=
None
,
destination
=
org
.
getRelativeUrl
(),
destination_section
=
org
.
getRelativeUrl
())
self
.
login
()
self
.
tic
()
self
.
assertEqual
([],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestinationSection
(
[],
None
,
None
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestinationSection
(
[],
None
,
support
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestinationSection
(
[
"destination_section"
],
None
,
support
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestinationSection
(
[
"destination"
],
None
,
support
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestinationSection
(
[
"destination_section"
,
"destination_project"
],
None
,
support
,
None
))
class
TestItem_getSecurityCategoryFromMovementAggregateDestinationProject
(
TestSlapOSCoreMixin
):
def
test
(
self
):
person
=
self
.
createPerson
()
node
=
self
.
createComputeNode
(
person
)
support
=
self
.
portal
.
support_request_module
.
newContent
(
portal_type
=
"Support Request"
,
aggregate
=
node
.
getRelativeUrl
()
)
org
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
project
=
self
.
portal
.
project_module
.
newContent
(
portal_type
=
'Project'
)
self
.
tic
()
self
.
login
(
person
.
getUserId
())
node
.
requestTransfer
(
destination_project
=
project
.
getRelativeUrl
(),
destination
=
org
.
getRelativeUrl
(),
destination_section
=
None
)
self
.
login
()
self
.
tic
()
self
.
assertEqual
([],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestinationProject
(
[],
None
,
None
,
None
))
self
.
assertEqual
([{
'destination_project'
:
[
project
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestinationProject
(
[],
None
,
support
,
None
))
self
.
assertEqual
([{
'destination_project'
:
[
project
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestinationProject
(
[
"destination_section"
],
None
,
support
,
None
))
self
.
assertEqual
([{
'destination_project'
:
[
project
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestinationProject
(
[
"destination"
],
None
,
support
,
None
))
self
.
assertEqual
([{
'destination_project'
:
[
project
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateDestinationProject
(
[
"destination_section"
,
"destination_project"
],
None
,
support
,
None
))
class
TestItem_getSecurityCategoryFromMovementAggregateComputeNodeDestinationSection
(
TestSlapOSCoreMixin
):
def
test
(
self
):
person
=
self
.
createPerson
()
node
=
self
.
createComputeNode
(
person
)
support
=
self
.
portal
.
support_request_module
.
newContent
(
portal_type
=
"Support Request"
,
aggregate
=
node
.
getRelativeUrl
()
)
org
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
self
.
tic
()
self
.
login
(
person
.
getUserId
())
node
.
requestTransfer
(
destination_project
=
None
,
destination
=
org
.
getRelativeUrl
(),
destination_section
=
org
.
getRelativeUrl
())
self
.
login
()
self
.
tic
()
self
.
assertEqual
([],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateComputeNodeDestinationSection
(
[],
None
,
None
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateComputeNodeDestinationSection
(
[],
None
,
support
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateComputeNodeDestinationSection
(
[
"destination_section"
],
None
,
support
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateComputeNodeDestinationSection
(
[
"destination"
],
None
,
support
,
None
))
self
.
assertEqual
([{
'destination_section'
:
[
org
.
getRelativeUrl
()]}],
self
.
portal
.
Item_getSecurityCategoryFromMovementAggregateComputeNodeDestinationSection
(
[
"destination_section"
,
"destination_project"
],
None
,
support
,
None
))
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