Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
erp5
Commits
29a1ce95
Commit
29a1ce95
authored
May 18, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix testConversionInSimulation
parent
15dc79be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
21 deletions
+15
-21
product/ERP5/tests/testConversionInSimulation.py
product/ERP5/tests/testConversionInSimulation.py
+15
-21
No files found.
product/ERP5/tests/testConversionInSimulation.py
View file @
29a1ce95
...
...
@@ -33,7 +33,6 @@ from zLOG import LOG
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
from
Testing
import
ZopeTestCase
from
Products.ERP5.tests.testAccounting
import
AccountingTestCase
from
Products.ERP5.tests.utils
import
newSimulationExpectedFailure
from
AccessControl.SecurityManagement
import
newSecurityManager
QUIET
=
False
run_all_test
=
True
...
...
@@ -232,9 +231,13 @@ class TestConversionInSimulation(AccountingTestCase):
trade_model_path
.
setCriterion
(
'portal_type'
,
'Simulation Movement'
)
self
.
tic
()
def
stepPackingListBuilderAlarm
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
def
buildPackingLists
(
self
):
self
.
portal
.
portal_alarms
.
packing_list_builder_alarm
.
activeSense
()
self
.
tic
()
def
buildInvoices
(
self
):
self
.
portal
.
portal_alarms
.
invoice_builder_alarm
.
activeSense
()
self
.
tic
()
def
test_01_simulation_movement_destination_asset_price
(
self
,
quiet
=
0
,
run
=
run_all_test
):
...
...
@@ -296,8 +299,7 @@ class TestConversionInSimulation(AccountingTestCase):
order
.
confirm
()
self
.
tic
()
self
.
stepPackingListBuilderAlarm
()
self
.
tic
()
self
.
buildPackingLists
()
related_applied_rule
=
order
.
getCausalityRelatedValue
(
portal_type
=
'Applied Rule'
)
...
...
@@ -389,8 +391,7 @@ class TestConversionInSimulation(AccountingTestCase):
order
.
confirm
()
self
.
tic
()
self
.
stepPackingListBuilderAlarm
()
self
.
tic
()
self
.
buildPackingLists
()
related_applied_rule
=
order
.
getCausalityRelatedValue
(
portal_type
=
'Applied Rule'
)
...
...
@@ -413,7 +414,6 @@ class TestConversionInSimulation(AccountingTestCase):
(
invoice_transaction_movement
.
getDestinationTotalAssetPrice
(),
None
)
@
newSimulationExpectedFailure
def
test_01_destination_total_asset_price_on_accounting_lines
(
self
,
quiet
=
0
,
run
=
run_all_test
):
"""
...
...
@@ -474,14 +474,14 @@ class TestConversionInSimulation(AccountingTestCase):
price
=
2
)
order
.
confirm
()
self
.
tic
()
self
.
stepPackingListBuilderAlarm
()
self
.
tic
()
self
.
buildPackingLists
()
related_packing_list
=
order
.
getCausalityRelatedValue
(
portal_type
=
'Sale Packing List'
)
self
.
assertNotEquals
(
related_packing_list
,
None
)
related_packing_list
.
start
()
related_packing_list
.
stop
()
self
.
tic
()
self
.
buildInvoices
()
related_applied_rule
=
order
.
getCausalityRelatedValue
(
portal_type
=
'Applied Rule'
)
order_movement
=
related_applied_rule
.
contentValues
()[
0
]
...
...
@@ -499,7 +499,6 @@ class TestConversionInSimulation(AccountingTestCase):
self
.
assertEquals
(
line
.
getDestinationTotalAssetPrice
(),
round
(
655.957
*
delivery_movement
.
getTotalPrice
()))
@
newSimulationExpectedFailure
def
test_01_diverged_sale_packing_list_destination_total_asset_price
(
self
,
quiet
=
0
,
run
=
run_all_test
):
"""
...
...
@@ -563,8 +562,7 @@ class TestConversionInSimulation(AccountingTestCase):
price
=
2
)
order
.
confirm
()
self
.
tic
()
self
.
stepPackingListBuilderAlarm
()
self
.
tic
()
self
.
buildPackingLists
()
related_packing_list
=
order
.
getCausalityRelatedValue
(
portal_type
=
'Sale Packing List'
)
self
.
assertNotEquals
(
related_packing_list
,
None
)
...
...
@@ -662,8 +660,7 @@ class TestConversionInSimulation(AccountingTestCase):
price
=
2
)
order
.
confirm
()
self
.
tic
()
self
.
stepPackingListBuilderAlarm
()
self
.
tic
()
self
.
buildPackingLists
()
related_packing_list
=
order
.
getCausalityRelatedValue
(
portal_type
=
'Purchase Packing List'
)
self
.
assertNotEquals
(
related_packing_list
,
None
)
...
...
@@ -698,7 +695,6 @@ class TestConversionInSimulation(AccountingTestCase):
getSourceTotalAssetPrice
(),
old_source_asset_price
*
(
3.0
/
5.0
))
@
newSimulationExpectedFailure
def
test_01_delivery_mode_on_sale_packing_list_and_invoice
(
self
,
quiet
=
0
,
run
=
run_all_test
):
"""
...
...
@@ -764,8 +760,7 @@ class TestConversionInSimulation(AccountingTestCase):
price
=
2
)
order
.
confirm
()
self
.
tic
()
self
.
stepPackingListBuilderAlarm
()
self
.
tic
()
self
.
buildPackingLists
()
related_packing_list
=
order
.
getCausalityRelatedValue
(
portal_type
=
'Sale Packing List'
)
self
.
assertNotEquals
(
related_packing_list
,
None
)
...
...
@@ -776,6 +771,7 @@ class TestConversionInSimulation(AccountingTestCase):
related_packing_list
.
start
()
related_packing_list
.
stop
()
self
.
tic
()
self
.
buildInvoices
()
related_invoice
=
related_packing_list
.
getCausalityRelatedValue
(
portal_type
=
'Sale Invoice Transaction'
)
self
.
assertNotEquals
(
related_invoice
,
None
)
...
...
@@ -784,7 +780,6 @@ class TestConversionInSimulation(AccountingTestCase):
self
.
assertEquals
(
related_invoice
.
getIncoterm
(),
order
.
getIncoterm
())
@
newSimulationExpectedFailure
def
test_01_quantity_unit_on_sale_packing_list
(
self
,
quiet
=
0
,
run
=
run_all_test
):
"""
...
...
@@ -841,8 +836,7 @@ class TestConversionInSimulation(AccountingTestCase):
price
=
2
)
order
.
confirm
()
self
.
tic
()
self
.
stepPackingListBuilderAlarm
()
self
.
tic
()
self
.
buildPackingLists
()
related_packing_list
=
order
.
getCausalityRelatedValue
(
portal_type
=
'Sale Packing List'
)
self
.
assertNotEquals
(
related_packing_list
,
None
)
...
...
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