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
Léo-Paul Géneau
slapos.core
Commits
ab2bd41e
Commit
ab2bd41e
authored
Dec 12, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid code duplication.
parent
181c2d07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
21 deletions
+7
-21
master/product/Vifib/tests/testVifibSlapWebService.py
master/product/Vifib/tests/testVifibSlapWebService.py
+7
-21
No files found.
master/product/Vifib/tests/testVifibSlapWebService.py
View file @
ab2bd41e
...
...
@@ -1776,13 +1776,13 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
filter_kw
=
sequence
.
get
(
'requested_filter_dict'
,
{}),
state
=
sequence
.
get
(
'instance_state'
))
def
stepSetSoftwareInstanceChildrenA
(
self
,
sequence
,
**
kw
):
def
_stepSetSoftwareInstanceChildren
(
self
,
sequence
,
source_reference
):
software_instance_uid
=
sequence
[
'root_software_instance_uid'
]
software_instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
software_instance_uid
)
children_software_instance
=
\
software_instance
.
portal_catalog
.
getResultValue
(
portal_type
=
"Software Instance"
,
source_reference
=
'children_a'
,
portal_type
=
"Software Instance"
,
source_reference
=
source_reference
,
root_uid
=
software_instance_uid
)
self
.
assertNotEqual
(
None
,
children_software_instance
)
self
.
assertNotEqual
(
software_instance
.
getRelativeUrl
(),
...
...
@@ -1794,31 +1794,17 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
_softwareInstance_getComputerPartition
(
children_software_instance
).
getReference
()
)
def
stepSetSoftwareInstanceChildrenA
(
self
,
sequence
,
**
kw
):
self
.
_stepSetSoftwareInstanceChildren
(
sequence
,
'children_a'
)
def
stepSetSoftwareInstanceChildrenB
(
self
,
sequence
,
**
kw
):
self
.
_stepSetSoftwareInstanceChildren
(
sequence
,
'children_b'
)
def
stepSetRootSoftwareInstanceCurrentInstance
(
self
,
sequence
,
**
kw
):
software_instance_uid
=
sequence
[
'software_instance_uid'
]
self
.
assertNotEqual
(
None
,
software_instance_uid
)
sequence
.
edit
(
root_software_instance_uid
=
software_instance_uid
)
def
stepSetSoftwareInstanceChildrenB
(
self
,
sequence
,
**
kw
):
software_instance_uid
=
sequence
[
'root_software_instance_uid'
]
software_instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
software_instance_uid
)
children_software_instance
=
\
software_instance
.
portal_catalog
.
getResultValue
(
portal_type
=
"Software Instance"
,
source_reference
=
'children_b'
,
root_uid
=
software_instance_uid
)
self
.
assertNotEqual
(
None
,
children_software_instance
)
self
.
assertNotEqual
(
software_instance
.
getRelativeUrl
(),
children_software_instance
.
getRelativeUrl
())
sequence
.
edit
(
software_instance_uid
=
children_software_instance
.
getUid
(),
software_instance_reference
=
children_software_instance
.
getReference
(),
computer_partition_reference
=
self
.
\
_softwareInstance_getComputerPartition
(
children_software_instance
).
getReference
()
)
def
stepRequestComputerPartitionDifferentReferenceSameTransaction
(
self
,
sequence
,
**
kw
):
software_release_uri
=
sequence
[
'software_release_uri'
]
...
...
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