Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
220efc32
Commit
220efc32
authored
Jan 23, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more testing of ticket clone.
parent
bb4f19c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
product/ERP5/tests/testCRM.py
product/ERP5/tests/testCRM.py
+37
-0
No files found.
product/ERP5/tests/testCRM.py
View file @
220efc32
...
@@ -1494,6 +1494,43 @@ class TestCRMMailSend(BaseTestCRM):
...
@@ -1494,6 +1494,43 @@ class TestCRMMailSend(BaseTestCRM):
self
.
assertEquals
(
new_event
.
getTitle
(),
real_title
)
self
.
assertEquals
(
new_event
.
getTitle
(),
real_title
)
self
.
assertEquals
(
new_event
.
getTextContent
(),
real_content
)
self
.
assertEquals
(
new_event
.
getTextContent
(),
real_content
)
def
test_cloneTicketAndEventList
(
self
):
"""
All events uses after script and interaciton
workflow add a test for clone
"""
portal
=
self
.
portal
event_list
=
[]
destination_list
=
[]
for
i
in
range
(
0
,
100
):
person
=
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
title
=
'Person %s'
%
i
)
destination_list
.
append
(
person
)
campaing
=
portal
.
campaign_module
.
newContent
(
portal_type
=
'Campaign'
,
reference
=
'Test'
)
for
i
in
range
(
0
,
3
):
event
=
portal
.
event_module
.
newContent
(
portal_type
=
'Mail Message'
,
title
=
'Mail %s'
%
i
,
follow_up
=
campaing
.
getRelativeUrl
())
event
.
setDestinationList
([
x
.
getRelativeUrl
()
for
x
in
destination_list
])
event_list
.
append
(
event
)
self
.
stepTic
()
# use Ticket_cloneTicketAndEventList
campaing
.
Ticket_cloneTicketAndEventList
()
self
.
stepTic
()
cloned_campaign
=
[
x
for
x
in
portal
.
campaign_module
.
objectValues
()
if
x
!=
campaing
][
0
]
cloned_event_list
=
[
x
for
x
in
portal
.
event_module
.
objectValues
()
if
x
.
getFollowUpValue
()
==
cloned_campaign
]
self
.
assertEqual
(
campaing
.
getTitle
(),
cloned_campaign
.
getTitle
())
self
.
assertEqual
(
campaing
.
getReference
(),
cloned_campaign
.
getReference
())
for
i
in
range
(
0
,
3
):
self
.
assertSameSet
(
event_list
[
i
].
getDestinationValueList
(),
cloned_event_list
[
i
].
getDestinationValueList
())
def
test_Base_addEvent
(
self
):
def
test_Base_addEvent
(
self
):
"""Check Base_addEvent script with a logged in user.
"""Check Base_addEvent script with a logged in user.
"""
"""
...
...
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