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
04888bac
Commit
04888bac
authored
Jul 28, 2020
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: Update Tests, Open sale order with no Lines are automatically archived
parent
92bc991b
Pipeline
#10692
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
21 deletions
+36
-21
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseDefaultScenarioMixin.py
...omponents/test.erp5.SlapOSTestCaseDefaultScenarioMixin.py
+16
-5
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseDefaultScenarioMixin.xml
...mponents/test.erp5.SlapOSTestCaseDefaultScenarioMixin.xml
+20
-16
No files found.
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseDefaultScenarioMixin.py
View file @
04888bac
...
@@ -625,8 +625,14 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
...
@@ -625,8 +625,14 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
self
.
assertEqual
(
2
,
len
(
open_sale_order_list
))
self
.
assertEqual
(
2
,
len
(
open_sale_order_list
))
open_sale_order
=
[
q
for
q
in
open_sale_order_list
archived_open_sale_order_list
=
[
q
for
q
in
open_sale_order_list
if
q
.
getValidationState
()
==
'archived'
][
0
]
if
q
.
getValidationState
()
==
'archived'
]
archived_open_sale_order_list
.
sort
(
key
=
lambda
x
:
x
.
getCreationDate
())
# Select the first archived
open_sale_order
=
archived_open_sale_order_list
[
0
]
line_list
=
open_sale_order
.
contentValues
(
line_list
=
open_sale_order
.
contentValues
(
portal_type
=
'Open Sale Order Line'
)
portal_type
=
'Open Sale Order Line'
)
self
.
assertEqual
(
len
(
hosting_subscription_list
),
len
(
line_list
))
self
.
assertEqual
(
len
(
hosting_subscription_list
),
len
(
line_list
))
...
@@ -635,9 +641,14 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
...
@@ -635,9 +641,14 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
[
q
.
getAggregate
()
for
q
in
line_list
]
[
q
.
getAggregate
()
for
q
in
line_list
]
)
)
validated_open_sale_order
=
[
q
for
q
in
open_sale_order_list
validated_open_sale_order_list
=
[
q
for
q
in
open_sale_order_list
if
q
.
getValidationState
()
==
'validated'
][
0
]
if
q
.
getValidationState
()
==
'validated'
]
line_list
=
validated_open_sale_order
.
contentValues
(
# if no line, all open orders are kept archived
self
.
assertEqual
(
len
(
validated_open_sale_order_list
),
0
)
latest_open_sale_order
=
archived_open_sale_order_list
[
-
1
]
line_list
=
latest_open_sale_order
.
contentValues
(
portal_type
=
'Open Sale Order Line'
)
portal_type
=
'Open Sale Order Line'
)
self
.
assertEqual
(
len
(
line_list
),
0
)
self
.
assertEqual
(
len
(
line_list
),
0
)
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseDefaultScenarioMixin.xml
View file @
04888bac
...
@@ -100,11 +100,13 @@
...
@@ -100,11 +100,13 @@
</record>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<list>
<dictionary>
<dictionary>
<item>
<item>
...
@@ -117,7 +119,9 @@
...
@@ -117,7 +119,9 @@
</item>
</item>
</dictionary>
</dictionary>
</list>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
</ZopeData>
</ZopeData>
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