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
Lu Xu
slapos.core
Commits
f0cea798
Commit
f0cea798
authored
Jan 27, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to current design.
Only next two months are covered.
parent
d36cae3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
master/product/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
...ct/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
+14
-14
No files found.
master/product/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
View file @
f0cea798
...
...
@@ -17,8 +17,8 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
causality_relative_url
=
hosting_subscription
.
getRelativeUrl
(),
sort_on
=
((
'delivery.start_date'
,
'desc'
),)
)
#
is whole year
covered?
self
.
assertEqual
(
1
2
,
len
(
delivery_list
))
#
are next two months
covered?
self
.
assertEqual
(
2
,
len
(
delivery_list
))
# generate the expected time frames
now
=
DateTime
()
...
...
@@ -123,7 +123,7 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
self
.
assertEqual
(
'planned'
,
setup_invoice_line_list
[
0
]
\
.
getSimulationState
())
# there are
1
2 confirmed subscription, so no invoice
# there are 2 confirmed subscription, so no invoice
subscription_delivery_line_list
=
catalog
(
portal_type
=
'Sale Packing List Line'
,
aggregate_relative_url
=
hosting_subscription_url
,
...
...
@@ -131,8 +131,8 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
sort_on
=
((
'movement.start_date'
,
'desc'
),)
)
self
.
assertEqual
(
1
2
,
len
(
subscription_delivery_line_list
))
self
.
assertEqual
([
'confirmed'
]
*
1
2
,
[
q
.
getSimulationState
()
for
\
self
.
assertEqual
(
2
,
len
(
subscription_delivery_line_list
))
self
.
assertEqual
([
'confirmed'
]
*
2
,
[
q
.
getSimulationState
()
for
\
q
in
subscription_delivery_line_list
])
subscription_invoice_line_list
=
catalog
(
portal_type
=
'Invoice Line'
,
...
...
@@ -212,14 +212,14 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
self
.
assertEqual
(
'planned'
,
setup_invoice_line_list
[
0
]
\
.
getSimulationState
())
# there are 1
1
confirmed and 1 stopped subscription, so 1 invoice line
# there are 1 confirmed and 1 stopped subscription, so 1 invoice line
subscription_delivery_line_list
=
catalog
(
portal_type
=
'Sale Packing List Line'
,
aggregate_relative_url
=
hosting_subscription_url
,
resource_relative_url
=
sequence
[
'subscription_resource'
])
self
.
assertEqual
(
1
2
,
len
(
subscription_delivery_line_list
))
self
.
assertEqual
(
([
'confirmed'
]
*
11
)
+
[
'stopped'
],
self
.
assertEqual
(
2
,
len
(
subscription_delivery_line_list
))
self
.
assertEqual
(
[
'confirmed'
]
+
[
'stopped'
],
sorted
([
q
.
getSimulationState
()
for
\
q
in
subscription_delivery_line_list
]))
...
...
@@ -308,8 +308,8 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
aggregate_relative_url
=
hosting_subscription_url
,
resource_relative_url
=
sequence
[
'subscription_resource'
])
self
.
assertEqual
(
1
2
,
len
(
subscription_delivery_line_list
))
self
.
assertEqual
(
([
'confirmed'
]
*
10
)
+
([
'stopped'
]
*
2
)
,
self
.
assertEqual
(
2
,
len
(
subscription_delivery_line_list
))
self
.
assertEqual
(
[
'stopped'
]
*
2
,
sorted
([
q
.
getSimulationState
()
for
\
q
in
subscription_delivery_line_list
]))
...
...
@@ -416,8 +416,8 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
aggregate_relative_url
=
hosting_subscription_url
,
resource_relative_url
=
sequence
[
'subscription_resource'
])
self
.
assertEqual
(
1
2
,
len
(
subscription_delivery_line_list
))
self
.
assertEqual
(
([
'confirmed'
]
*
10
)
+
([
'stopped'
]
*
2
)
,
self
.
assertEqual
(
2
,
len
(
subscription_delivery_line_list
))
self
.
assertEqual
(
[
'stopped'
]
*
2
,
sorted
([
q
.
getSimulationState
()
for
\
q
in
subscription_delivery_line_list
]))
...
...
@@ -532,8 +532,8 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
aggregate_relative_url
=
hosting_subscription_url
,
resource_relative_url
=
sequence
[
'subscription_resource'
])
self
.
assertEqual
(
1
2
,
len
(
subscription_delivery_line_list
))
self
.
assertEqual
(
([
'confirmed'
]
*
10
)
+
([
'stopped'
]
*
2
)
,
self
.
assertEqual
(
2
,
len
(
subscription_delivery_line_list
))
self
.
assertEqual
(
[
'stopped'
]
*
2
,
sorted
([
q
.
getSimulationState
()
for
\
q
in
subscription_delivery_line_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