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
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
abd99c6f
Commit
abd99c6f
authored
Oct 21, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: No more Friends
parent
378cdef3
Pipeline
#17959
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
45 deletions
+7
-45
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5InteractionWorkflow.py
...components/test.erp5.testSlapOSERP5InteractionWorkflow.py
+7
-45
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5InteractionWorkflow.py
View file @
abd99c6f
...
...
@@ -76,23 +76,17 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
person
=
self
.
makePerson
()
self
.
assertNotIn
(
person
.
getDefaultEmailCoordinateText
(),
[
None
,
""
])
compute_node
=
self
.
_test_ComputeNode_setAllocationScope_public
(
self
.
_test_ComputeNode_setAllocationScope_public
(
source_administration
=
person
.
getRelativeUrl
())
self
.
assertEqual
(
compute_node
.
getSubjectList
(),
[
''
])
self
.
assertEqual
(
compute_node
.
getDestinationSection
(),
None
)
def
test_ComputeNode_setAllocationScope_subscription_with_source_adm
(
self
):
person
=
self
.
makePerson
()
self
.
assertNotIn
(
person
.
getDefaultEmailCoordinateText
(),
[
None
,
""
])
compute_node
=
self
.
_test_ComputeNode_setAllocationScope_public
(
self
.
_test_ComputeNode_setAllocationScope_public
(
source_administration
=
person
.
getRelativeUrl
(),
allocation_scope
=
"open/subscription"
)
self
.
assertEqual
(
compute_node
.
getSubjectList
(),
[
''
])
self
.
assertEqual
(
compute_node
.
getDestinationSection
(),
None
)
def
_test_ComputeNode_setAllocationScope_personal
(
self
,
upgrade_scope
=
None
,
...
...
@@ -103,8 +97,6 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
monitor_scope
=
None
,
upgrade_scope
=
upgrade_scope
,
source_administration
=
source_administration
)
if
subject_list
:
compute_node
.
setSubjectList
(
subject_list
)
self
.
commit
()
compute_node
.
edit
(
allocation_scope
=
'open/personal'
)
...
...
@@ -116,22 +108,16 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
def
test_ComputeNode_setAllocationScope_personal
(
self
):
compute_node
=
self
.
_test_ComputeNode_setAllocationScope_personal
()
self
.
assertEqual
(
compute_node
.
getUpgradeScope
(),
'ask_confirmation'
)
self
.
assertEqual
(
compute_node
.
getSubjectList
(),
[])
self
.
assertEqual
(
compute_node
.
getDestinationSection
(),
None
)
def
test_ComputeNode_setAllocationScope_personal_upgrade_disabled
(
self
):
compute_node
=
self
.
_test_ComputeNode_setAllocationScope_personal
(
upgrade_scope
=
"disabled"
)
self
.
assertEqual
(
compute_node
.
getUpgradeScope
(),
'disabled'
)
self
.
assertEqual
(
compute_node
.
getSubjectList
(),
[])
self
.
assertEqual
(
compute_node
.
getDestinationSection
(),
None
)
def
test_ComputeNode_setAllocationScope_personal_upgrade_auto
(
self
):
compute_node
=
self
.
_test_ComputeNode_setAllocationScope_personal
(
upgrade_scope
=
"auto"
)
self
.
assertEqual
(
compute_node
.
getUpgradeScope
(),
'auto'
)
self
.
assertEqual
(
compute_node
.
getSubjectList
(),
[])
self
.
assertEqual
(
compute_node
.
getDestinationSection
(),
None
)
def
test_ComputeNode_setAllocationScope_personal_with_source_adm
(
self
):
person
=
self
.
makePerson
()
...
...
@@ -142,9 +128,6 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
source_administration
=
person
.
getRelativeUrl
(),
)
self
.
assertEqual
(
compute_node
.
getUpgradeScope
(),
'ask_confirmation'
)
self
.
assertEqual
(
compute_node
.
getSubjectList
(),
[
person
.
getDefaultEmailCoordinateText
()])
self
.
assertEqual
(
compute_node
.
getDestinationSectionList
(),
[
person
.
getRelativeUrl
()])
def
test_ComputeNode_setAllocationScope_personal_with_subject_list
(
self
):
person
=
self
.
makePerson
()
...
...
@@ -156,9 +139,6 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
subject_list
=
[
"some@example.com"
]
)
self
.
assertEqual
(
compute_node
.
getUpgradeScope
(),
'ask_confirmation'
)
self
.
assertEqual
(
compute_node
.
getSubjectList
(),
[
person
.
getDefaultEmailCoordinateText
()])
self
.
assertEqual
(
compute_node
.
getDestinationSectionList
(),
[
person
.
getRelativeUrl
()])
def
_test_ComputeNode_setAllocationScope_closed
(
self
,
upgrade_scope
=
None
,
...
...
@@ -170,8 +150,7 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
monitor_scope
=
None
,
upgrade_scope
=
upgrade_scope
,
source_administration
=
source_administration
)
if
subject_list
:
compute_node
.
setSubjectList
(
subject_list
)
self
.
commit
()
compute_node
.
edit
(
allocation_scope
=
allocation_scope
)
...
...
@@ -190,13 +169,9 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
self
.
tic
()
self
.
assertNotIn
(
person
.
getDefaultEmailCoordinateText
(),
[
None
,
""
])
compute_node
=
self
.
_test_ComputeNode_setAllocationScope_closed
(
self
.
_test_ComputeNode_setAllocationScope_closed
(
source_administration
=
person
.
getRelativeUrl
())
self
.
assertEqual
(
compute_node
.
getSubjectList
(),
[
person
.
getDefaultEmailCoordinateText
()])
self
.
assertEqual
(
compute_node
.
getDestinationSectionList
(),
[
person
.
getRelativeUrl
()])
def
test_ComputeNode_setAllocationScope_closed_termination_no_source_adm
(
self
):
self
.
_test_ComputeNode_setAllocationScope_closed
(
allocation_scope
=
"close/termination"
,
...
...
@@ -207,14 +182,10 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
self
.
tic
()
self
.
assertNotIn
(
person
.
getDefaultEmailCoordinateText
(),
[
None
,
""
])
compute_node
=
self
.
_test_ComputeNode_setAllocationScope_closed
(
self
.
_test_ComputeNode_setAllocationScope_closed
(
allocation_scope
=
"close/termination"
,
source_administration
=
person
.
getRelativeUrl
())
self
.
assertEqual
(
compute_node
.
getSubjectList
(),
[
person
.
getDefaultEmailCoordinateText
()])
self
.
assertEqual
(
compute_node
.
getDestinationSectionList
(),
[
person
.
getRelativeUrl
()])
def
test_ComputeNode_setAllocationScope_closed_outdated_no_source_adm
(
self
):
self
.
_test_ComputeNode_setAllocationScope_closed
(
allocation_scope
=
"close/outdated"
,
...
...
@@ -225,14 +196,10 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
self
.
tic
()
self
.
assertNotIn
(
person
.
getDefaultEmailCoordinateText
(),
[
None
,
""
])
compute_node
=
self
.
_test_ComputeNode_setAllocationScope_closed
(
self
.
_test_ComputeNode_setAllocationScope_closed
(
allocation_scope
=
"close/outdated"
,
source_administration
=
person
.
getRelativeUrl
())
self
.
assertEqual
(
compute_node
.
getSubjectList
(),
[
person
.
getDefaultEmailCoordinateText
()])
self
.
assertEqual
(
compute_node
.
getDestinationSectionList
(),
[
person
.
getRelativeUrl
()])
def
test_ComputeNode_setAllocationScope_closed_maintenance_no_source_adm
(
self
):
self
.
_test_ComputeNode_setAllocationScope_closed
(
allocation_scope
=
"close/maintenance"
,
...
...
@@ -243,15 +210,10 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
self
.
tic
()
self
.
assertNotIn
(
person
.
getDefaultEmailCoordinateText
(),
[
None
,
""
])
compute_node
=
self
.
_test_ComputeNode_setAllocationScope_closed
(
self
.
_test_ComputeNode_setAllocationScope_closed
(
allocation_scope
=
"close/maintenance"
,
source_administration
=
person
.
getRelativeUrl
())
self
.
assertEqual
(
compute_node
.
getSubjectList
(),
[
person
.
getDefaultEmailCoordinateText
()])
self
.
assertEqual
(
compute_node
.
getDestinationSectionList
(),
[
person
.
getRelativeUrl
()])
class
TestSlapOSERP5InteractionWorkflowComputerNetworkSetReference
(
SlapOSTestCaseMixin
):
...
...
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