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
Xiaowu Zhang
slapos.core
Commits
fd2346a1
Commit
fd2346a1
authored
Nov 28, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepare test change.
Disable obsoleted code and mark lack of implementation.
parent
fe1115d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
38 deletions
+40
-38
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
...os_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
+39
-37
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 @
fd2346a1
...
...
@@ -385,43 +385,43 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
causality_state
=
packing_list
.
getCausalityState
()
self
.
assertEqual
(
'solved'
,
causality_state
)
invoice_list
=
packing_list
.
getCausalityRelatedValueList
(
portal_type
=
'Sale Invoice Transaction'
)
self
.
assertEqual
(
1
,
len
(
invoice_list
))
invoice
=
invoice_list
[
0
]
self
.
assertEqual
(
'Sale Invoice Transaction'
,
invoice
.
getPortalType
())
self
.
assertEqual
(
'delivered'
,
invoice
.
getSimulationState
())
causality_state
=
invoice
.
getCausalityState
()
self
.
assertEqual
(
'solved'
,
causality_state
)
self
.
assertEqual
(
0
,
len
(
invoice
.
checkConsistency
()))
self
.
assertSameSet
([
packing_list
.
getRelativeUrl
()],
invoice
.
getCausalityList
(
portal_type
=
self
.
portal
.
getPortalDeliveryTypeList
()))
self
.
assertSameSet
([
invoice
.
getRelativeUrl
()],
packing_list
.
getCausalityRelatedList
(
portal_type
=
self
.
portal
.
getPortalDeliveryTypeList
()))
payment_list
=
invoice
.
getCausalityRelatedValueList
(
portal_type
=
self
.
portal
.
getPortalDeliveryTypeList
())
if
invoice
.
getTotalPrice
()
==
0
:
self
.
assertEqual
(
0
,
len
(
payment_list
))
else
:
self
.
assertEqual
(
1
,
len
(
payment_list
))
payment
=
payment_list
[
0
]
self
.
assertEqual
(
'Payment Transaction'
,
payment
.
getPortalType
())
self
.
assertEqual
(
'delivered'
,
payment
.
getSimulationState
())
causality_state
=
payment
.
getCausalityState
()
self
.
assertEqual
(
'solved'
,
causality_state
)
self
.
assertEqual
(
0
,
len
(
payment
.
checkConsistency
()))
self
.
assertSameSet
([
invoice
.
getRelativeUrl
()],
payment
.
getCausalityList
(
portal_type
=
self
.
portal
.
getPortalDeliveryTypeList
()))
self
.
assertSameSet
([
payment
.
getRelativeUrl
()],
invoice
.
getCausalityRelatedList
(
portal_type
=
self
.
portal
.
getPortalDeliveryTypeList
()))
self
.
assertEqual
(
-
1
*
payment
.
PaymentTransaction_getTotalPayablePrice
(),
invoice
.
getTotalPrice
())
#
invoice_list = packing_list.getCausalityRelatedValueList(
#
portal_type='Sale Invoice Transaction')
#
self.assertEqual(1, len(invoice_list))
#
invoice = invoice_list[0]
#
self.assertEqual('Sale Invoice Transaction',
#
invoice.getPortalType())
#
self.assertEqual('delivered', invoice.getSimulationState())
#
causality_state = invoice.getCausalityState()
#
self.assertEqual('solved', causality_state)
#
self.assertEqual(0, len(invoice.checkConsistency()))
#
self.assertSameSet([packing_list.getRelativeUrl()],
#
invoice.getCausalityList(
#
portal_type=self.portal.getPortalDeliveryTypeList()))
#
self.assertSameSet([invoice.getRelativeUrl()],
#
packing_list.getCausalityRelatedList(
#
portal_type=self.portal.getPortalDeliveryTypeList()))
#
payment_list = invoice.getCausalityRelatedValueList(
#
portal_type=self.portal.getPortalDeliveryTypeList())
#
if invoice.getTotalPrice() == 0:
#
self.assertEqual(0, len(payment_list))
#
else:
#
self.assertEqual(1, len(payment_list))
#
payment = payment_list[0]
#
self.assertEqual('Payment Transaction',
#
payment.getPortalType())
#
self.assertEqual('delivered', payment.getSimulationState())
#
causality_state = payment.getCausalityState()
#
self.assertEqual('solved', causality_state)
#
self.assertEqual(0, len(payment.checkConsistency()))
#
self.assertSameSet([invoice.getRelativeUrl()],
#
payment.getCausalityList(
#
portal_type=self.portal.getPortalDeliveryTypeList()))
#
self.assertSameSet([payment.getRelativeUrl()],
#
invoice.getCausalityRelatedList(
#
portal_type=self.portal.getPortalDeliveryTypeList()))
#
self.assertEqual(-1 * payment.PaymentTransaction_getTotalPayablePrice(),
#
invoice.getTotalPrice())
def
assertOpenSaleOrderCoverage
(
self
,
person_reference
):
self
.
login
()
...
...
@@ -643,3 +643,5 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
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 @
fd2346a1
106
\ No newline at end of file
107
\ 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