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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
ff1f8b81
Commit
ff1f8b81
authored
Mar 26, 2018
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_interface_post: update tests
parent
cc07a119
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
bt5/erp5_interface_post/TestTemplateItem/portal_components/test.erp5.testInterfacePost.py
...lateItem/portal_components/test.erp5.testInterfacePost.py
+12
-12
No files found.
bt5/erp5_interface_post/TestTemplateItem/portal_components/test.erp5.testInterfacePost.py
View file @
ff1f8b81
...
@@ -112,7 +112,7 @@ class TestInterfacePost(ERP5TypeTestCase):
...
@@ -112,7 +112,7 @@ class TestInterfacePost(ERP5TypeTestCase):
self
.
portal
.
portal_skins
.
custom
,
self
.
portal
.
portal_skins
.
custom
,
"LetterPost_export"
,
"LetterPost_export"
,
""
,
""
,
"
if context.getSimulationState() == 'exportable':
\
n
context.export()"
,
"context.export()"
,
)
)
def
_stepCreateEvent
(
self
,
portal_type
,
sequence
=
None
,
sequence_list
=
None
):
def
_stepCreateEvent
(
self
,
portal_type
,
sequence
=
None
,
sequence_list
=
None
):
...
@@ -164,16 +164,16 @@ class TestInterfacePost(ERP5TypeTestCase):
...
@@ -164,16 +164,16 @@ class TestInterfacePost(ERP5TypeTestCase):
'start_action'
'start_action'
)
)
def
_
allow
ExportOfAllPostByPortalType
(
self
,
portal_type
):
def
_
prepare
ExportOfAllPostByPortalType
(
self
,
portal_type
):
result_list
=
self
.
_portal_catalog
(
portal_type
=
portal_type
)
result_list
=
self
.
_portal_catalog
(
portal_type
=
portal_type
)
for
result
in
result_list
:
for
result
in
result_list
:
result
.
allow
Export
()
result
.
prepare
Export
()
def
step
Allow
ExportOfAllInternetMessagePost
(
self
,
sequence
=
None
,
sequence_list
=
None
):
def
step
Prepare
ExportOfAllInternetMessagePost
(
self
,
sequence
=
None
,
sequence_list
=
None
):
self
.
_
allow
ExportOfAllPostByPortalType
(
'Internet Message Post'
)
self
.
_
prepare
ExportOfAllPostByPortalType
(
'Internet Message Post'
)
def
step
Allow
ExportOfAllLetterPost
(
self
,
sequence
=
None
,
sequence_list
=
None
):
def
step
Prepare
ExportOfAllLetterPost
(
self
,
sequence
=
None
,
sequence_list
=
None
):
self
.
_
allow
ExportOfAllPostByPortalType
(
'Letter Post'
)
self
.
_
prepare
ExportOfAllPostByPortalType
(
'Letter Post'
)
def
stepChangeMailMessageTextContent
(
self
,
sequence
=
None
,
sequence_list
=
None
):
def
stepChangeMailMessageTextContent
(
self
,
sequence
=
None
,
sequence_list
=
None
):
mail_message
=
sequence
[
'mail_message'
]
mail_message
=
sequence
[
'mail_message'
]
...
@@ -211,14 +211,13 @@ class TestInterfacePost(ERP5TypeTestCase):
...
@@ -211,14 +211,13 @@ class TestInterfacePost(ERP5TypeTestCase):
def
stepCheckOnlyOneLetterPostIsExported
(
self
,
sequence
=
None
,
sequence_list
=
None
):
def
stepCheckOnlyOneLetterPostIsExported
(
self
,
sequence
=
None
,
sequence_list
=
None
):
self
.
_checkOnlyOnePostIsExportedByPortalType
(
'Letter Post'
)
self
.
_checkOnlyOnePostIsExportedByPortalType
(
'Letter Post'
)
def
stepCheckAllLetterPost
AreExportable
(
self
,
sequence
=
None
,
sequence_list
=
None
):
def
stepCheckAllLetterPost
IsExportPrepared
(
self
,
sequence
=
None
,
sequence_list
=
None
):
letter_post_list
=
self
.
_portal_catalog
(
letter_post_list
=
self
.
_portal_catalog
(
portal_type
=
'Letter Post'
,
portal_type
=
'Letter Post'
,
simulation_state
=
'export
able
'
,
simulation_state
=
'export
_prepared
'
,
)
)
self
.
assertEqual
(
len
(
letter_post_list
),
len
(
sequence
[
'letter_list'
]))
self
.
assertEqual
(
len
(
letter_post_list
),
len
(
sequence
[
'letter_list'
]))
for
letter_post
in
letter_post_list
:
for
letter_post
in
letter_post_list
:
self
.
assertEqual
(
letter_post
.
getSimulationState
(),
'exportable'
)
self
.
assertTrue
(
letter_post
.
hasData
())
self
.
assertTrue
(
letter_post
.
hasData
())
self
.
assertEqual
(
letter_post
.
getContentType
(),
'application/pdf'
)
self
.
assertEqual
(
letter_post
.
getContentType
(),
'application/pdf'
)
self
.
assertIn
(
self
.
assertIn
(
...
@@ -319,8 +318,9 @@ class TestInterfacePost(ERP5TypeTestCase):
...
@@ -319,8 +318,9 @@ class TestInterfacePost(ERP5TypeTestCase):
portal_type
=
'Internet Message Post'
,
portal_type
=
'Internet Message Post'
,
data
=
mail_object
.
as_string
(),
data
=
mail_object
.
as_string
(),
)
)
response_post
.
InternetMessagePost_inges
t
()
response_post
.
prepareImpor
t
()
sequence
[
'internet_message_post_response'
]
=
response_post
sequence
[
'internet_message_post_response'
]
=
response_post
response_post
.
log
(
'Nicolas : %s'
%
response_post
.
getId
())
def
stepCheckMailMessageResponseCreated
(
self
,
sequence
=
None
,
sequence_list
=
None
):
def
stepCheckMailMessageResponseCreated
(
self
,
sequence
=
None
,
sequence_list
=
None
):
response_list
=
self
.
_portal_catalog
(
response_list
=
self
.
_portal_catalog
(
...
@@ -436,7 +436,7 @@ class TestInterfacePost(ERP5TypeTestCase):
...
@@ -436,7 +436,7 @@ class TestInterfacePost(ERP5TypeTestCase):
stepCreateLetter
stepCreateLetter
stepSendAllLetter
stepSendAllLetter
stepTic
stepTic
stepCheckAllLetterPost
AreExportable
stepCheckAllLetterPost
IsExportPrepared
stepLaunchExportOnLetterPostModule
stepLaunchExportOnLetterPostModule
stepTic
stepTic
stepCheckAllLetterPostAreExported
stepCheckAllLetterPostAreExported
...
...
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