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
Leo Le Bouter
erp5
Commits
b6eb14af
Commit
b6eb14af
authored
Oct 12, 2017
by
Cédric Le Ninivin
Committed by
Cédric Le Ninivin
Oct 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testInvoice: Solve divergence before setting ready the packing list + add test on Constraint
parent
4f891753
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
product/ERP5/tests/testInvoice.py
product/ERP5/tests/testInvoice.py
+27
-0
No files found.
product/ERP5/tests/testInvoice.py
View file @
b6eb14af
...
...
@@ -33,6 +33,7 @@
import
xml.dom.minidom
import
zipfile
from
Products.DCWorkflow.DCWorkflow
import
ValidationFailed
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.utils
import
FileUpload
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
...
...
@@ -767,6 +768,26 @@ class TestInvoiceMixin(TestPackingListMixin):
packing_list
=
sequence
.
get
(
'packing_list'
)
packing_list
.
edit
(
description
=
'This packing list was edited!'
)
def
stepAcceptDecisionDescriptionPackingList
(
self
,
sequence
=
None
,
sequence_list
=
None
):
packing_list
=
sequence
.
get
(
'packing_list'
)
self
.
_solveDivergence
(
packing_list
,
'description'
,
'Accept Solver'
)
def
stepAssertCausalityStateIsNotSolvedInConsistencyMessage
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
packing_list
=
sequence
.
get
(
'packing_list'
)
self
.
assertEqual
(
[
'Causality State is not "Solved". Please wait or take action'
+
' for causality state to reach "Solved".'
],
[
str
(
message
.
message
)
for
message
in
packing_list
.
checkConsistency
()])
def
stepSetReadyWorkflowTransitionIsBlockByConsistency
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
packing_list
=
sequence
.
get
(
'packing_list'
)
with
self
.
assertRaisesRegexp
(
ValidationFailed
,
'.*Causality State is not "Solved"*'
):
self
.
getPortal
().
portal_workflow
.
doActionFor
(
packing_list
,
'set_ready_action'
)
def
stepCheckDeliveryRuleNotAppliedOnPackingListEdit
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
"""If we call edit on the packing list, delivery rule should not be
...
...
@@ -2741,6 +2762,12 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase):
base_sequence
+
"""
stepEditPackingListLine
stepTic
stepCheckPackingListIsDiverged
stepAssertCausalityStateIsNotSolvedInConsistencyMessage
stepSetReadyWorkflowTransitionIsBlockByConsistency
stepAcceptDecisionDescriptionPackingList
stepTic
stepSetReadyPackingList
stepTic
stepStartPackingList
...
...
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