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
Carlos Ramos Carreño
slapos.core
Commits
278a4a60
Commit
278a4a60
authored
Nov 29, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finalise scenario according to current use case.
parent
8733a4fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
46 deletions
+58
-46
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
...os_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
+57
-45
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
No files found.
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
View file @
278a4a60
...
@@ -386,43 +386,61 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
...
@@ -386,43 +386,61 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
causality_state
=
packing_list
.
getCausalityState
()
causality_state
=
packing_list
.
getCausalityState
()
self
.
assertEqual
(
'solved'
,
causality_state
)
self
.
assertEqual
(
'solved'
,
causality_state
)
# invoice_list = packing_list.getCausalityRelatedValueList(
def
assertAggregatedSalePackingList
(
self
,
delivery
):
# portal_type='Sale Invoice Transaction')
self
.
assertEqual
(
'delivered'
,
delivery
.
getSimulationState
())
# self.assertEqual(1, len(invoice_list))
self
.
assertEqual
(
'solved'
,
delivery
.
getCausalityState
())
# invoice = invoice_list[0]
# self.assertEqual('Sale Invoice Transaction',
invoice_list
=
delivery
.
getCausalityRelatedValueList
(
# invoice.getPortalType())
portal_type
=
'Sale Invoice Transaction'
)
# self.assertEqual('delivered', invoice.getSimulationState())
self
.
assertEqual
(
1
,
len
(
invoice_list
))
# causality_state = invoice.getCausalityState()
invoice
=
invoice_list
[
0
].
getObject
()
# self.assertEqual('solved', causality_state)
# self.assertEqual(0, len(invoice.checkConsistency()))
causality_list
=
invoice
.
getCausalityValueList
()
# self.assertSameSet([packing_list.getRelativeUrl()],
# invoice.getCausalityList(
self
.
assertSameSet
([
delivery
],
causality_list
)
# portal_type=self.portal.getPortalDeliveryTypeList()))
# self.assertSameSet([invoice.getRelativeUrl()],
self
.
assertEqual
(
'stopped'
,
invoice
.
getSimulationState
())
# packing_list.getCausalityRelatedList(
self
.
assertEqual
(
'solved'
,
invoice
.
getCausalityState
())
# portal_type=self.portal.getPortalDeliveryTypeList()))
# payment_list = invoice.getCausalityRelatedValueList(
payment_list
=
invoice
.
getCausalityRelatedValueList
(
# portal_type=self.portal.getPortalDeliveryTypeList())
portal_type
=
'Payment Transaction'
)
# if invoice.getTotalPrice() == 0:
self
.
assertEqual
(
1
,
len
(
payment_list
))
# self.assertEqual(0, len(payment_list))
# else:
payment
=
payment_list
[
0
].
getObject
()
# self.assertEqual(1, len(payment_list))
# payment = payment_list[0]
causality_list
=
payment
.
getCausalityValueList
()
# self.assertEqual('Payment Transaction',
self
.
assertSameSet
([
invoice
],
causality_list
)
# payment.getPortalType())
# self.assertEqual('delivered', payment.getSimulationState())
self
.
assertEqual
(
'auto_planned'
,
payment
.
getSimulationState
())
# causality_state = payment.getCausalityState()
self
.
assertEqual
(
'draft'
,
payment
.
getCausalityState
())
# self.assertEqual('solved', causality_state)
# self.assertEqual(0, len(payment.checkConsistency()))
self
.
assertEqual
(
-
1
*
payment
.
PaymentTransaction_getTotalPayablePrice
(),
# self.assertSameSet([invoice.getRelativeUrl()],
invoice
.
getTotalPrice
())
# payment.getCausalityList(
# portal_type=self.portal.getPortalDeliveryTypeList()))
def
assertPersonDocumentCoverage
(
self
,
person
):
# self.assertSameSet([payment.getRelativeUrl()],
self
.
login
()
# invoice.getCausalityRelatedList(
subscription_list
=
self
.
portal
.
portal_catalog
(
# portal_type=self.portal.getPortalDeliveryTypeList()))
portal_type
=
'Hosting Subscription'
,
# self.assertEqual(-1 * payment.PaymentTransaction_getTotalPayablePrice(),
default_destination_section_uid
=
person
.
getUid
())
# invoice.getTotalPrice())
for
subscription
in
subscription_list
:
self
.
assertHostingSubscriptionSimulationCoverage
(
subscription
.
getObject
())
aggregated_delivery_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Sale Packing List'
,
default_destination_section_uid
=
person
.
getUid
(),
specialise_uid
=
self
.
portal
.
restrictedTraverse
(
self
.
portal
\
.
portal_preferences
.
getPreferredAggregatedSaleTradeCondition
()
\
).
getUid
()
)
if
len
(
subscription_list
)
==
0
:
self
.
assertEqual
(
0
,
len
(
aggregated_delivery_list
))
return
self
.
assertNotEqual
(
0
,
len
(
aggregated_delivery_list
))
for
aggregated_delivery
in
aggregated_delivery_list
:
self
.
assertAggregatedSalePackingList
(
aggregated_delivery
.
getObject
())
def
assertOpenSaleOrderCoverage
(
self
,
person_reference
):
def
assertOpenSaleOrderCoverage
(
self
,
person_reference
):
self
.
login
()
self
.
login
()
...
@@ -650,15 +668,9 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
...
@@ -650,15 +668,9 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
self
.
stepCallSlaposManageBuildingCalculatingDeliveryAlarm
()
self
.
stepCallSlaposManageBuildingCalculatingDeliveryAlarm
()
self
.
tic
()
self
.
tic
()
# check final
simulation
state
# check final
document
state
for
person_reference
in
(
owner_reference
,
friend_reference
,
for
person_reference
in
(
owner_reference
,
friend_reference
,
public_reference
):
public_reference
):
person
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Person'
,
person
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Person'
,
reference
=
person_reference
)
reference
=
person_reference
)
for
subscription
in
self
.
portal
.
portal_catalog
(
self
.
assertPersonDocumentCoverage
(
person
)
portal_type
=
'Hosting Subscription'
,
default_destination_section_uid
=
person
.
getUid
()):
self
.
assertHostingSubscriptionSimulationCoverage
(
subscription
.
getObject
())
self
.
assertTrue
(
False
,
'Update to aggregated accoounting'
)
master/bt5/slapos_erp5/bt/revision
View file @
278a4a60
110
111
\ No newline at end of file
\ No newline at end of file
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