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
Roque
slapos.core
Commits
a66103c2
Commit
a66103c2
authored
May 25, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put step in test module.
parent
d95ed3d1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
32 deletions
+32
-32
master/product/Vifib/tests/testVifibSlapWebService.py
master/product/Vifib/tests/testVifibSlapWebService.py
+0
-32
master/product/Vifib/tests/testVifibSlapWebServiceSlaveInstance.py
...oduct/Vifib/tests/testVifibSlapWebServiceSlaveInstance.py
+32
-0
No files found.
master/product/Vifib/tests/testVifibSlapWebService.py
View file @
a66103c2
...
...
@@ -717,38 +717,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer
.
requestSoftwareReleaseInstallation
(
software_release_url
=
software_release
.
getUrlString
())
def
stepCheckComputerPartitionSaleOrderAggregatedList
(
self
,
sequence
):
portal_catalog
=
self
.
portal
.
portal_catalog
sale_packing_list
=
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'sale_packing_list_uid'
])
sale_packing_list_line
=
sale_packing_list
.
objectValues
()[
0
]
computer_partition
=
sale_packing_list_line
.
getAggregateValue
(
portal_type
=
self
.
computer_partition_portal_type
)
sale_order_line_list
=
computer_partition
.
getAggregateRelatedValueList
(
portal_type
=
"Sale Order Line"
)
sale_order_line_1
,
sale_order_line_2
=
sale_order_line_list
self
.
assertEquals
(
sale_order_line_1
.
getAggregateValue
(
portal_type
=
self
.
computer_partition_portal_type
),
sale_order_line_2
.
getAggregateValue
(
portal_type
=
self
.
computer_partition_portal_type
))
self
.
assertEquals
(
2
,
len
(
sale_order_line_list
))
sale_packing_line_list
=
computer_partition
.
getAggregateRelatedValueList
(
portal_type
=
"Sale Packing List Line"
)
self
.
assertEquals
(
2
,
len
(
sale_packing_line_list
))
sale_packing_list_line_1
,
sale_packing_list_line_2
=
sale_packing_line_list
self
.
assertEquals
(
sale_packing_list_line_1
.
getAggregateValue
(
portal_type
=
self
.
software_release_portal_type
),
sale_packing_list_line_2
.
getAggregateValue
(
portal_type
=
self
.
software_release_portal_type
))
self
.
assertEquals
(
sale_packing_list_line_1
.
getAggregateValue
(
portal_type
=
self
.
computer_partition_portal_type
),
sale_packing_list_line_2
.
getAggregateValue
(
portal_type
=
self
.
computer_partition_portal_type
))
hosting_1
,
hosting_2
=
[
hosting
.
getAggregateValue
(
portal_type
=
self
.
hosting_subscription_portal_type
)
\
for
hosting
in
sale_packing_line_list
]
self
.
assertNotEquals
(
hosting_1
,
hosting_2
)
def
_createComputer
(
self
):
# Mimics WebSection_registerNewComputer
computer_reference
=
"COMP-%s"
%
self
.
portal
.
portal_ids
.
generateNewId
(
...
...
master/product/Vifib/tests/testVifibSlapWebServiceSlaveInstance.py
View file @
a66103c2
...
...
@@ -4,6 +4,38 @@ import unittest
from
Products.ERP5Type.tests.backportUnittest
import
skip
class
TestVifibSlapWebServiceSlaveInstance
(
TestVifibSlapWebServiceMixin
):
def
stepCheckComputerPartitionSaleOrderAggregatedList
(
self
,
sequence
):
portal_catalog
=
self
.
portal
.
portal_catalog
sale_packing_list
=
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'sale_packing_list_uid'
])
sale_packing_list_line
=
sale_packing_list
.
objectValues
()[
0
]
computer_partition
=
sale_packing_list_line
.
getAggregateValue
(
portal_type
=
self
.
computer_partition_portal_type
)
sale_order_line_list
=
computer_partition
.
getAggregateRelatedValueList
(
portal_type
=
"Sale Order Line"
)
sale_order_line_1
,
sale_order_line_2
=
sale_order_line_list
self
.
assertEquals
(
sale_order_line_1
.
getAggregateValue
(
portal_type
=
self
.
computer_partition_portal_type
),
sale_order_line_2
.
getAggregateValue
(
portal_type
=
self
.
computer_partition_portal_type
))
self
.
assertEquals
(
2
,
len
(
sale_order_line_list
))
sale_packing_line_list
=
computer_partition
.
getAggregateRelatedValueList
(
portal_type
=
"Sale Packing List Line"
)
self
.
assertEquals
(
2
,
len
(
sale_packing_line_list
))
sale_packing_list_line_1
,
sale_packing_list_line_2
=
sale_packing_line_list
self
.
assertEquals
(
sale_packing_list_line_1
.
getAggregateValue
(
portal_type
=
self
.
software_release_portal_type
),
sale_packing_list_line_2
.
getAggregateValue
(
portal_type
=
self
.
software_release_portal_type
))
self
.
assertEquals
(
sale_packing_list_line_1
.
getAggregateValue
(
portal_type
=
self
.
computer_partition_portal_type
),
sale_packing_list_line_2
.
getAggregateValue
(
portal_type
=
self
.
computer_partition_portal_type
))
hosting_1
,
hosting_2
=
[
hosting
.
getAggregateValue
(
portal_type
=
self
.
hosting_subscription_portal_type
)
\
for
hosting
in
sale_packing_line_list
]
self
.
assertNotEquals
(
hosting_1
,
hosting_2
)
def
test_SlaveInstance_Person_request_with_Different_User
(
self
):
"""
Check that user B can declare a slot of slave instance in computer
...
...
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