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
Thomas Gambier
slapos.core
Commits
537709fa
Commit
537709fa
authored
Nov 13, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase coverage with Open Sale Order.
parent
10597281
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
2 deletions
+43
-2
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
...os_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
+42
-1
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
No files found.
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
View file @
537709fa
...
@@ -369,6 +369,38 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
...
@@ -369,6 +369,38 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
partition
.
contentValues
(
portal_type
=
'Internet Protocol Address'
)],
partition
.
contentValues
(
portal_type
=
'Internet Protocol Address'
)],
connection_dict
.
values
())
connection_dict
.
values
())
def
assertOpenSaleOrderCoverage
(
self
,
person_reference
):
self
.
login
()
person
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Person'
,
reference
=
person_reference
)
hosting_subscription_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Hosting Subscription'
,
default_destination_section_uid
=
person
.
getUid
()
)
open_sale_order_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Open Sale Order'
,
default_destination_section_uid
=
person
.
getUid
(),
validation_state
=
'validated'
)
if
len
(
hosting_subscription_list
)
==
0
:
self
.
assertEqual
(
0
,
len
(
open_sale_order_list
))
return
self
.
assertEqual
(
1
,
len
(
open_sale_order_list
))
open_sale_order
=
open_sale_order_list
[
0
]
line_list
=
open_sale_order
.
contentValues
(
portal_type
=
'Open Sale Order Line'
)
self
.
assertEqual
(
len
(
hosting_subscription_list
),
len
(
line_list
))
self
.
assertSameSet
(
[
q
.
getRelativeUrl
()
for
q
in
hosting_subscription_list
],
[
q
.
getAggregate
()
for
q
in
line_list
]
)
def
test
(
self
):
def
test
(
self
):
# some preparation
# some preparation
self
.
logout
()
self
.
logout
()
...
@@ -484,5 +516,14 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
...
@@ -484,5 +516,14 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
public_server_software
,
public_instance_type
,
public_server
)
public_server_software
,
public_instance_type
,
public_server
)
self
.
checkInstanceUnallocation
(
friend_reference
,
friend_instance_title
,
self
.
checkInstanceUnallocation
(
friend_reference
,
friend_instance_title
,
friend_server_software
,
friend_instance_type
,
friend_server
)
friend_server_software
,
friend_instance_type
,
friend_server
)
# check the Open Sale Order coverage
self
.
stepCallSlaposRequestUpdateHostingSubscriptionOpenSaleOrderAlarm
()
self
.
tic
()
self
.
login
()
self
.
assertOpenSaleOrderCoverage
(
owner_reference
)
self
.
assertOpenSaleOrderCoverage
(
friend_reference
)
self
.
assertOpenSaleOrderCoverage
(
public_reference
)
master/bt5/slapos_erp5/bt/revision
View file @
537709fa
87
88
\ No newline at end of file
\ No newline at end of file
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