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
16
Merge Requests
16
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
nexedi
slapos.core
Commits
3cf74711
Commit
3cf74711
authored
Nov 15, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cover basic assertions for subscription delivery building.
parent
dcc8022e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
...os_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
+33
-0
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 @
3cf74711
...
...
@@ -398,6 +398,25 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
else
:
raise
NotImplementedError
def
assertHostingSubscriptionRelatedDeliveryList
(
self
,
subscription
):
self
.
login
()
applied_rule_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Applied Rule'
,
causality_uid
=
subscription
.
getUid
())
self
.
assertEqual
(
1
,
len
(
applied_rule_list
))
applied_rule
=
applied_rule_list
[
0
]
simulation_movement_list
=
applied_rule
.
contentValues
(
portal_type
=
'Simulation Movement'
)
self
.
assertNotEqual
(
0
,
len
(
simulation_movement_list
))
for
simulation_movement
in
simulation_movement_list
:
self
.
assertNotEqual
(
None
,
simulation_movement
.
getDelivery
())
delivery_line
=
simulation_movement
.
getDeliveryValue
()
delivery
=
delivery_line
.
getParentValue
()
self
.
assertEqual
(
'Sale Packing List'
,
delivery
.
getPortalType
())
self
.
assertEqual
(
'delivered'
,
delivery
.
getSimulationState
())
self
.
assertEqual
(
'building'
,
delivery
.
getCausalityState
())
def
assertOpenSaleOrderCoverage
(
self
,
person_reference
):
self
.
login
()
person
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Person'
,
...
...
@@ -571,3 +590,17 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
default_destination_section_uid
=
person
.
getUid
()):
self
.
assertHostingSubscriptionSimulationCoverage
(
subscription
.
getObject
())
# check the generated Subscription Sale Packing Lists
self
.
stepCallSlaposTriggerBuildAlarm
()
self
.
tic
()
for
person_reference
in
(
owner_reference
,
friend_reference
,
public_reference
):
person
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Person'
,
reference
=
person_reference
)
for
subscription
in
self
.
portal
.
portal_catalog
(
portal_type
=
'Hosting Subscription'
,
default_destination_section_uid
=
person
.
getUid
()):
self
.
assertHostingSubscriptionRelatedDeliveryList
(
subscription
.
getObject
())
master/bt5/slapos_erp5/bt/revision
View file @
3cf74711
89
\ No newline at end of file
90
\ 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