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
Léo-Paul Géneau
slapos.core
Commits
e29f3f0b
Commit
e29f3f0b
authored
Feb 24, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow code change.
Invoices has no causality.
parent
e8ff4162
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
36 deletions
+13
-36
master/product/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
...ct/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
+13
-36
No files found.
master/product/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
View file @
e29f3f0b
...
@@ -143,11 +143,8 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
...
@@ -143,11 +143,8 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
invoice
=
setup_invoice_line_list
[
0
].
getParentValue
()
invoice
=
setup_invoice_line_list
[
0
].
getParentValue
()
self
.
assertEqual
(
'solved'
,
invoice
.
getCausalityState
())
self
.
assertEqual
(
'solved'
,
invoice
.
getCausalityState
())
# invoice shall have causality of one packing list
# invoice shall have no causality
self
.
assertSameSet
(
self
.
assertEqual
(
invoice
.
getCausalityList
(),
[])
[
setup_delivery_line_list
[
0
].
getParentValue
().
getUid
(),
subscription_delivery_line_list
[
0
].
getParentValue
().
getUid
()],
invoice
.
getCausalityUidList
())
# there shall be no payment transaction related
# there shall be no payment transaction related
self
.
assertEqual
([],
invoice
.
getCausalityRelatedList
(
self
.
assertEqual
([],
invoice
.
getCausalityRelatedList
(
...
@@ -229,11 +226,9 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
...
@@ -229,11 +226,9 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
# invoice shall be solved
# invoice shall be solved
self
.
assertEqual
(
'solved'
,
setup_invoice_line_list
[
0
].
getCausalityState
())
self
.
assertEqual
(
'solved'
,
setup_invoice_line_list
[
0
].
getCausalityState
())
# invoice shall have causality of two packing lists
# invoice shall have no causality
self
.
assertEqual
(
self
.
assertEqual
(
setup_invoice_line_list
[
0
].
getParentValue
()
\
sorted
([
setup_delivery_line_list
[
0
].
getParentValue
().
getUid
()]
+
.
getCausalityList
(),
[])
[
q
.
getParentValue
().
getUid
()
for
q
in
subscription_delivery_line_list
if
q
.
getSimulationState
()
==
'delivered'
]),
sorted
(
setup_invoice_line_list
[
0
].
getParentValue
().
getCausalityUidList
()))
def
stepSelectPlannedInvoice
(
self
,
sequence
,
**
kw
):
def
stepSelectPlannedInvoice
(
self
,
sequence
,
**
kw
):
hosting_subscription
=
self
.
portal
.
portal_catalog
.
getResultValue
(
hosting_subscription
=
self
.
portal
.
portal_catalog
.
getResultValue
(
...
@@ -339,20 +334,11 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
...
@@ -339,20 +334,11 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
self
.
assertEqual
([],
confirmed_invoice
.
getCausalityRelatedList
(
self
.
assertEqual
([],
confirmed_invoice
.
getCausalityRelatedList
(
portal_type
=
'Payment Transaction'
))
portal_type
=
'Payment Transaction'
))
# confirmed invoice shall have causality of two packing lists
# confirmed invoice shall have no causality
self
.
assertEqual
(
self
.
assertEqual
(
confirmed_invoice
.
getCausalityList
(),
[])
sorted
([
setup_delivery_line_list
[
0
].
getParentValue
().
getUid
()]
+
[
q
.
getParentValue
().
getUid
()
for
q
in
subscription_delivery_line_list
\
if
q
.
getSimulationState
()
==
'stopped'
and
\
q
.
getParentValue
().
getUid
()
!=
sequence
[
'subscription_delivery_uid'
]]),
sorted
(
confirmed_invoice
.
getCausalityUidList
()))
# planned invoice shall have causality of one packing list
# planned invoice shall have no causality
self
.
assertEqual
(
self
.
assertEqual
(
planned_invoice
.
getCausalityList
(),
[])
[
q
.
getParentValue
().
getUid
()
for
q
in
subscription_delivery_line_list
\
if
q
.
getSimulationState
()
==
'stopped'
and
\
q
.
getParentValue
().
getUid
()
==
sequence
[
'subscription_delivery_uid'
]],
planned_invoice
.
getCausalityUidList
())
def
stepStartInvoice
(
self
,
sequence
,
**
kw
):
def
stepStartInvoice
(
self
,
sequence
,
**
kw
):
self
.
portal
.
portal_catalog
.
getResultValue
(
self
.
portal
.
portal_catalog
.
getResultValue
(
...
@@ -463,20 +449,11 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
...
@@ -463,20 +449,11 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
self
.
assertEqual
(
stopped_invoice
.
getTotalPrice
(),
self
.
assertEqual
(
stopped_invoice
.
getTotalPrice
(),
-
1
*
payment_transaction
.
PaymentTransaction_getTotalPayablePrice
())
-
1
*
payment_transaction
.
PaymentTransaction_getTotalPayablePrice
())
# Stopped invoice shall have causality of two packing lists
# Stopped invoice shall have no causality
self
.
assertEqual
(
self
.
assertEqual
(
stopped_invoice
.
getCausalityList
(),
[])
sorted
([
setup_delivery_line_list
[
0
].
getParentValue
().
getUid
()]
+
[
q
.
getParentValue
().
getUid
()
for
q
in
subscription_delivery_line_list
\
if
q
.
getSimulationState
()
==
'stopped'
and
\
q
.
getParentValue
().
getUid
()
!=
sequence
[
'subscription_delivery_uid'
]]),
sorted
(
stopped_invoice
.
getCausalityUidList
()))
# planned invoice shall have causality of one packing list
# planned invoice shall have no causality
self
.
assertEqual
(
self
.
assertEqual
(
planned_invoice
.
getCausalityList
(),
[])
[
q
.
getParentValue
().
getUid
()
for
q
in
subscription_delivery_line_list
\
if
q
.
getSimulationState
()
==
'stopped'
and
\
q
.
getParentValue
().
getUid
()
==
sequence
[
'subscription_delivery_uid'
]],
planned_invoice
.
getCausalityUidList
())
def
stepCheckHostingSubscriptionTwoStoppedInvoiceDocumentCoverage
(
self
,
def
stepCheckHostingSubscriptionTwoStoppedInvoiceDocumentCoverage
(
self
,
sequence
,
**
kw
):
sequence
,
**
kw
):
...
...
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