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
797d5a12
Commit
797d5a12
authored
Dec 27, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop garbage.
parent
3e9f976f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
50 deletions
+5
-50
master/product/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
...ct/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
+5
-50
No files found.
master/product/Vifib/tests/testVifibInstanceHostingRelatedDocument.py
View file @
797d5a12
...
@@ -10,6 +10,9 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
...
@@ -10,6 +10,9 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
def
stepTriggerBuild
(
self
,
sequence
,
**
kw
):
def
stepTriggerBuild
(
self
,
sequence
,
**
kw
):
self
.
portal
.
portal_alarms
.
vifib_trigger_build
.
activeSense
()
self
.
portal
.
portal_alarms
.
vifib_trigger_build
.
activeSense
()
def
stepCheckPayment
(
self
,
sequence
,
**
kw
):
raise
NotImplementedError
def
stepCheckSubscriptionSalePackingListCoverage
(
self
,
sequence
,
**
kw
):
def
stepCheckSubscriptionSalePackingListCoverage
(
self
,
sequence
,
**
kw
):
hosting_subscription
=
self
.
portal
.
portal_catalog
.
getResultValue
(
hosting_subscription
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'hosting_subscription_uid'
])
uid
=
sequence
[
'hosting_subscription_uid'
])
...
@@ -76,55 +79,6 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
...
@@ -76,55 +79,6 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
idx
+=
1
idx
+=
1
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
(),
'confirmed'
)
self
.
assertEqual
(
sale_invoice_transaction
.
getCausalityList
(),
[
sequence
[
'current_sale_packing_list'
].
getRelativeUrl
()])
self
.
portal
.
portal_workflow
.
doActionFor
(
sale_invoice_transaction
,
'start_action'
)
self
.
assertEqual
(
sale_invoice_transaction
.
getSimulationState
(),
'started'
)
def
stepCheckPayment
(
self
,
sequence
,
**
kw
):
payment_transaction
=
sequence
[
'current_payment_transaction'
]
self
.
assertEqual
(
payment_transaction
.
getSimulationState
(),
'planned'
)
self
.
assertEqual
(
payment_transaction
.
getCausalityList
(),
[
sequence
[
'current_sale_invoice_transaction'
].
getRelativeUrl
()])
self
.
portal
.
portal_workflow
.
doActionFor
(
payment_transaction
,
'confirm_action'
)
self
.
assertEqual
(
payment_transaction
.
getSimulationState
(),
'confirmed'
)
def
stepCheckHostingSubscriptionInitialDocumentCoverage
(
self
,
sequence
,
**
kw
):
def
stepCheckHostingSubscriptionInitialDocumentCoverage
(
self
,
sequence
,
**
kw
):
catalog
=
self
.
portal
.
portal_catalog
catalog
=
self
.
portal
.
portal_catalog
hosting_resource
=
self
.
portal
.
portal_preferences
\
hosting_resource
=
self
.
portal
.
portal_preferences
\
...
@@ -309,10 +263,11 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
...
@@ -309,10 +263,11 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
Tic
Tic
CheckHostingSubscriptionStoppedDocumentCoverage
CheckHostingSubscriptionStoppedDocumentCoverage
CheckPayment
"""
"""
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
sequence_list
.
play
(
self
)
raise
NotImplementedError
(
'Cover various cases of triggering build'
)
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
...
...
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