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
Łukasz Nowak
slapos.core
Commits
0071448b
Commit
0071448b
authored
Dec 26, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skeletonise method.
parent
715427c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
29 deletions
+32
-29
master/product/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
...ct/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
+32
-29
No files found.
master/product/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
View file @
0071448b
...
...
@@ -10,35 +10,9 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
def
stepTriggerBuild
(
self
,
sequence
,
**
kw
):
self
.
portal
.
portal_alarms
.
vifib_trigger_build
.
activeSense
()
def
stepCheckOneMoreDocumentList
(
self
,
sequence
,
**
kw
):
hosting_subscription
=
self
.
portal
.
portal_catalog
\
.
getResultValue
(
uid
=
sequence
[
'hosting_subscription_uid'
])
sale_packing_list_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Sale Packing List'
,
causality_relative_url
=
hosting_subscription
.
getRelativeUrl
(),
sort_on
=
((
'delivery.start_date'
,
"DESC"
)))
self
.
assertEqual
(
sequence
[
'number_of_sale_packing_list'
],
len
(
sale_packing_list_list
))
sale_packing_list
=
sale_packing_list_list
[
0
].
getObject
()
sale_invoice_transaction_list
=
sale_packing_list
\
.
getCausalityRelatedValueList
(
portal_type
=
'Sale Invoice Transaction'
)
self
.
assertEqual
(
sequence
[
'invoice_amount'
],
len
(
sale_invoice_transaction_list
))
sale_invoice_transaction
=
sale_invoice_transaction_list
[
0
]
payment_transaction_list
=
sale_invoice_transaction
\
.
getCausalityRelatedValueList
(
portal_type
=
'Payment Transaction'
)
self
.
assertEqual
(
1
,
len
(
payment_transaction_list
))
payment_transaction
=
payment_transaction_list
[
0
]
sequence
.
edit
(
current_sale_packing_list
=
sale_packing_list
,
current_sale_invoice_transaction
=
sale_invoice_transaction
,
current_payment_transaction
=
payment_transaction
)
def
stepCheckSalePackingList
(
self
,
sequence
,
**
kw
):
def
stepCheckSubscriptionSalePackingListCoverage
(
self
,
sequence
,
**
kw
):
raise
NotImplementedError
(
"Shall check that 12 SPLs are build to cover the whole year."
)
# check one more sale packing list is generated
# and only one sale packing list line is inside
sale_packing_list
=
sequence
[
'current_sale_packing_list'
]
...
...
@@ -80,6 +54,35 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
self
.
assertEquals
(
open_order_line
.
getSpecialise
(),
sale_packing_list
.
getSpecialise
())
def
stepCheckOneMoreDocumentList
(
self
,
sequence
,
**
kw
):
hosting_subscription
=
self
.
portal
.
portal_catalog
\
.
getResultValue
(
uid
=
sequence
[
'hosting_subscription_uid'
])
sale_packing_list_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Sale Packing List'
,
causality_relative_url
=
hosting_subscription
.
getRelativeUrl
(),
sort_on
=
((
'delivery.start_date'
,
"DESC"
)))
self
.
assertEqual
(
sequence
[
'number_of_sale_packing_list'
],
len
(
sale_packing_list_list
))
sale_packing_list
=
sale_packing_list_list
[
0
].
getObject
()
sale_invoice_transaction_list
=
sale_packing_list
\
.
getCausalityRelatedValueList
(
portal_type
=
'Sale Invoice Transaction'
)
self
.
assertEqual
(
sequence
[
'invoice_amount'
],
len
(
sale_invoice_transaction_list
))
sale_invoice_transaction
=
sale_invoice_transaction_list
[
0
]
payment_transaction_list
=
sale_invoice_transaction
\
.
getCausalityRelatedValueList
(
portal_type
=
'Payment Transaction'
)
self
.
assertEqual
(
1
,
len
(
payment_transaction_list
))
payment_transaction
=
payment_transaction_list
[
0
]
sequence
.
edit
(
current_sale_packing_list
=
sale_packing_list
,
current_sale_invoice_transaction
=
sale_invoice_transaction
,
current_payment_transaction
=
payment_transaction
)
def
stepCheckInvoiceAndInvoiceTransaction
(
self
,
sequence
,
**
kw
):
sale_invoice_transaction
=
sequence
[
'current_sale_invoice_transaction'
]
self
.
assertEqual
(
sale_invoice_transaction
.
getSimulationState
(),
...
...
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