Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
105
Merge Requests
105
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
9e5b402b
Commit
9e5b402b
authored
Dec 28, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check that no Payment is accidentaly created.
parent
dde5b9b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
master/product/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
...ct/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
+17
-2
No files found.
master/product/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
View file @
9e5b402b
...
@@ -145,12 +145,17 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
...
@@ -145,12 +145,17 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
self
.
assertEqual
(
0
,
len
(
subscription_invoice_line_list
))
self
.
assertEqual
(
0
,
len
(
subscription_invoice_line_list
))
# invoice shall be solved
# invoice shall be solved
self
.
assertEqual
(
'solved'
,
setup_invoice_line_list
[
0
].
getCausalityState
())
invoice
=
setup_invoice_line_list
[
0
].
getParentValue
()
self
.
assertEqual
(
'solved'
,
invoice
.
getCausalityState
())
# invoice shall have causality of one packing list
# invoice shall have causality of one packing list
self
.
assertEqual
(
self
.
assertEqual
(
[
setup_delivery_line_list
[
0
].
getParentValue
().
getUid
()],
[
setup_delivery_line_list
[
0
].
getParentValue
().
getUid
()],
setup_invoice_line_list
[
0
].
getParentValue
().
getCausalityUidList
())
invoice
.
getCausalityUidList
())
# there shall be no payment transaction related
self
.
assertEqual
([],
invoice
.
getCausalityRelatedList
(
portal_type
=
'Payment Transaction'
))
sequence
.
edit
(
sequence
.
edit
(
subscription_delivery_uid_list
=
[
q
.
getParentValue
().
getUid
()
for
q
in
\
subscription_delivery_uid_list
=
[
q
.
getParentValue
().
getUid
()
for
q
in
\
...
@@ -254,6 +259,10 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
...
@@ -254,6 +259,10 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
simulation_state
=
'planned'
simulation_state
=
'planned'
)
)
# there shall be no payment transaction related
self
.
assertEqual
([],
invoice_line
.
getParentValue
().
getCausalityRelatedList
(
portal_type
=
'Payment Transaction'
))
sequence
.
edit
(
invoice_uid
=
invoice_line
.
getParentValue
().
getUid
())
sequence
.
edit
(
invoice_uid
=
invoice_line
.
getParentValue
().
getUid
())
def
stepConfirmInvoice
(
self
,
sequence
,
**
kw
):
def
stepConfirmInvoice
(
self
,
sequence
,
**
kw
):
...
@@ -339,6 +348,12 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
...
@@ -339,6 +348,12 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
self
.
assertEqual
(
'solved'
,
planned_invoice
.
getCausalityState
())
self
.
assertEqual
(
'solved'
,
planned_invoice
.
getCausalityState
())
self
.
assertEqual
(
'solved'
,
confirmed_invoice
.
getCausalityState
())
self
.
assertEqual
(
'solved'
,
confirmed_invoice
.
getCausalityState
())
# there shall be no payment transaction related
self
.
assertEqual
([],
planned_invoice
.
getCausalityRelatedList
(
portal_type
=
'Payment Transaction'
))
self
.
assertEqual
([],
confirmed_invoice
.
getCausalityRelatedList
(
portal_type
=
'Payment Transaction'
))
# confirmed invoice shall have causality of two packing lists
# confirmed invoice shall have causality of two packing lists
self
.
assertEqual
(
self
.
assertEqual
(
sorted
([
setup_delivery_line_list
[
0
].
getParentValue
().
getUid
()]
+
sorted
([
setup_delivery_line_list
[
0
].
getParentValue
().
getUid
()]
+
...
...
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