Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
da571a6a
Commit
da571a6a
authored
Jan 10, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crm: missing Ticket_getArrowItemList test
parent
12d0ee4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
product/ERP5/tests/testCRM.py
product/ERP5/tests/testCRM.py
+35
-0
No files found.
product/ERP5/tests/testCRM.py
View file @
da571a6a
...
...
@@ -183,6 +183,41 @@ class TestCRM(BaseTestCRM):
title
=
'New Title'
,
event_workflow_action
=
'plan'
)
def
test_Ticket_getArrowItemList
(
self
):
# test Ticket_getArrowItemList script
pers1
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
title
=
'Person 1'
)
pers2
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
title
=
'Person 2'
)
ticket
=
self
.
portal
.
meeting_module
.
newContent
(
portal_type
=
'Meeting'
)
ticket
.
setDestinationDecisionValue
(
pers1
)
ticket
.
setSourceValue
(
pers1
)
self
.
assertEqual
(
[(
''
,
''
),
(
'Person 1'
,
pers1
.
getRelativeUrl
())],
ticket
.
Ticket_getArrowItemList
())
# logged in user is also returned
user
=
self
.
createUser
(
self
.
id
(),
person_kw
=
{
"first_name"
:
"John"
,
"last_name"
:
"Doe"
})
self
.
tic
()
self
.
portal
.
acl_users
.
zodb_roles
.
assignRoleToPrincipal
(
'Assignee'
,
user
.
getUserId
())
self
.
login
(
user
.
getUserId
())
self
.
assertEqual
(
[(
''
,
''
),
(
'John Doe'
,
user
.
getRelativeUrl
()),
(
'Person 1'
,
pers1
.
getRelativeUrl
())],
ticket
.
Ticket_getArrowItemList
())
# multiple category value are supported
ticket
.
setSourceSectionValueList
([
user
,
pers2
])
self
.
assertEqual
(
[(
''
,
''
),
(
'John Doe'
,
user
.
getRelativeUrl
()),
(
'Person 1'
,
pers1
.
getRelativeUrl
()),
(
'Person 2'
,
pers2
.
getRelativeUrl
())],
ticket
.
Ticket_getArrowItemList
())
def
checkCreateRelatedEventSelectionParamsOnPersonModule
(
self
,
direction
):
# create related event from selected persons.
person_module
=
self
.
portal
.
person_module
...
...
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