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
Carlos Ramos Carreño
slapos.core
Commits
b1be8c9d
Commit
b1be8c9d
authored
Dec 26, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify checking.
parent
e781e625
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
master/product/Vifib/tests/testVifibOpenOrderSimulation.py
master/product/Vifib/tests/testVifibOpenOrderSimulation.py
+10
-15
No files found.
master/product/Vifib/tests/testVifibOpenOrderSimulation.py
View file @
b1be8c9d
...
@@ -88,28 +88,21 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
...
@@ -88,28 +88,21 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
# test the test: have we generated 12th months coverage?
# test the test: have we generated 12th months coverage?
self
.
assertEqual
(
12
,
len
(
expected_time_frame_tuple_list
))
self
.
assertEqual
(
12
,
len
(
expected_time_frame_tuple_list
))
simulation_movement_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Simulation Movement'
,
parent_uid
=
applied_rule
.
getUid
(),
sort_on
=
((
'movement.start_date'
,
'desc'
),)
)
# Check that simulation is created by the periodicity
# Check that simulation is created by the periodicity
self
.
assertEquals
(
len
(
expected_time_frame_tuple_list
),
self
.
assertEquals
(
len
(
expected_time_frame_tuple_list
),
len
(
applied_rule
.
contentValues
()
))
len
(
simulation_movement_list
))
# Check the list of expected simulation
# Check the list of expected simulation
idx
=
0
idx
=
0
while
idx
+
1
<
len
(
expected_time_frame_tuple_list
)
:
for
simulation_movement
in
simulation_movement_list
:
excepted_start_date
=
expected_time_frame_tuple_list
[
idx
][
0
]
excepted_start_date
=
expected_time_frame_tuple_list
[
idx
][
0
]
excepted_stop_date
=
expected_time_frame_tuple_list
[
idx
][
1
]
excepted_stop_date
=
expected_time_frame_tuple_list
[
idx
][
1
]
# select simulation given start_date and stop_date
idx
+=
1
simulation_movement_list
=
\
self
.
portal
.
portal_catalog
.
unrestrictedSearchResults
(
parent_uid
=
applied_rule
.
getUid
(),
portal_type
=
"Simulation Movement"
,
**
{
'movement.start_date'
:
excepted_start_date
,
'movement.stop_date'
:
excepted_stop_date
,
})
self
.
assertEquals
(
1
,
len
(
simulation_movement_list
))
simulation_movement
=
simulation_movement_list
[
0
].
getObject
()
self
.
assertNotEquals
(
None
,
simulation_movement
)
# Check simulation movement property
# Check simulation movement property
self
.
assertEquals
(
1.0
,
self
.
assertEquals
(
1.0
,
simulation_movement
.
getQuantity
())
simulation_movement
.
getQuantity
())
...
@@ -147,6 +140,8 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
...
@@ -147,6 +140,8 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
self
.
assertEquals
(
None
,
self
.
assertEquals
(
None
,
simulation_movement
.
getAggregate
(
simulation_movement
.
getAggregate
(
portal_type
=
"Software Release"
))
portal_type
=
"Software Release"
))
self
.
assertEqual
(
excepted_start_date
,
simulation_movement
.
getStartDate
())
self
.
assertEqual
(
excepted_stop_date
,
simulation_movement
.
getStopDate
())
# fetch invoice level simulation
# fetch invoice level simulation
applied_rule_invoice_list
=
\
applied_rule_invoice_list
=
\
...
...
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