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
Frederic Thoma
erp5
Commits
80c30ea0
Commit
80c30ea0
authored
May 31, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Person.getTitle uses firstname/lastname when available
parent
c5923245
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
product/ERP5/tests/testPerson.py
product/ERP5/tests/testPerson.py
+4
-0
product/ERP5OOo/tests/testOOoImport.py
product/ERP5OOo/tests/testOOoImport.py
+4
-4
No files found.
product/ERP5/tests/testPerson.py
View file @
80c30ea0
...
@@ -89,6 +89,10 @@ class TestPerson(ERP5TypeTestCase):
...
@@ -89,6 +89,10 @@ class TestPerson(ERP5TypeTestCase):
## its reference must NOT be resetted
## its reference must NOT be resetted
self
.
assertEqual
(
person_copy_obj
.
getReference
(),
person
.
getReference
())
self
.
assertEqual
(
person_copy_obj
.
getReference
(),
person
.
getReference
())
def
test_PersonGetTitleDefined
(
self
):
p
=
self
.
_makeOne
(
title
=
"title"
)
self
.
assertEqual
(
"title"
,
p
.
getTitle
())
# title & first_name, last_name
# title & first_name, last_name
def
testEmptyTitleFallbackOnId
(
self
):
def
testEmptyTitleFallbackOnId
(
self
):
p
=
self
.
_makeOne
(
id
=
self
.
id
())
p
=
self
.
_makeOne
(
id
=
self
.
id
())
...
...
product/ERP5OOo/tests/testOOoImport.py
View file @
80c30ea0
...
@@ -175,7 +175,7 @@ class TestOOoImport(TestOOoImportMixin):
...
@@ -175,7 +175,7 @@ class TestOOoImport(TestOOoImportMixin):
num
=
10
num
=
10
person_list
=
self
.
getPortal
().
person_module
.
objectValues
()
person_list
=
self
.
getPortal
().
person_module
.
objectValues
()
self
.
assertEqual
(
self
.
assertEqual
(
sorted
([
'John Doe %s'
%
(
i
)
for
i
in
range
(
num
)])
,
[
'John'
]
*
num
,
sorted
([
person_list
[
i
].
getTitle
()
for
i
in
range
(
num
)]))
sorted
([
person_list
[
i
].
getTitle
()
for
i
in
range
(
num
)]))
self
.
assertEqual
(
self
.
assertEqual
(
sorted
([
'John'
for
i
in
range
(
num
)]),
sorted
([
'John'
for
i
in
range
(
num
)]),
...
@@ -202,7 +202,7 @@ class TestOOoImport(TestOOoImportMixin):
...
@@ -202,7 +202,7 @@ class TestOOoImport(TestOOoImportMixin):
num
=
10
num
=
10
person_list
=
self
.
getPortal
().
person_module
.
objectValues
()
person_list
=
self
.
getPortal
().
person_module
.
objectValues
()
self
.
assertEqual
(
self
.
assertEqual
(
sorted
([
'John Doe %s'
%
(
i
)
for
i
in
range
(
num
)])
,
[
'John'
]
*
num
,
sorted
([
person_list
[
i
].
getTitle
()
for
i
in
range
(
num
)]))
sorted
([
person_list
[
i
].
getTitle
()
for
i
in
range
(
num
)]))
self
.
assertEqual
(
self
.
assertEqual
(
sorted
([
'John'
for
i
in
range
(
num
)]),
sorted
([
'John'
for
i
in
range
(
num
)]),
...
@@ -218,7 +218,7 @@ class TestOOoImport(TestOOoImportMixin):
...
@@ -218,7 +218,7 @@ class TestOOoImport(TestOOoImportMixin):
num
=
10
num
=
10
person_list
=
self
.
getPortal
().
person_module
.
objectValues
()
person_list
=
self
.
getPortal
().
person_module
.
objectValues
()
self
.
assertEqual
(
self
.
assertEqual
(
sorted
([
'John Doe é %s'
%
(
i
)
for
i
in
range
(
num
)])
,
[
'John'
]
*
num
,
sorted
([
person_list
[
i
].
getTitle
()
for
i
in
range
(
num
)]))
sorted
([
person_list
[
i
].
getTitle
()
for
i
in
range
(
num
)]))
self
.
assertEqual
(
self
.
assertEqual
(
sorted
([
'John'
for
i
in
range
(
num
)]),
sorted
([
'John'
for
i
in
range
(
num
)]),
...
@@ -239,7 +239,7 @@ class TestOOoImport(TestOOoImportMixin):
...
@@ -239,7 +239,7 @@ class TestOOoImport(TestOOoImportMixin):
num
=
10
num
=
10
person_list
=
self
.
getPortal
().
person_module
.
objectValues
()
person_list
=
self
.
getPortal
().
person_module
.
objectValues
()
self
.
assertEqual
(
self
.
assertEqual
(
sorted
([
'John Doe %s'
%
(
i
)
for
i
in
range
(
num
)])
,
[
'John'
]
*
num
,
sorted
([
person_list
[
i
].
getTitle
()
for
i
in
range
(
num
)]))
sorted
([
person_list
[
i
].
getTitle
()
for
i
in
range
(
num
)]))
self
.
assertEqual
(
self
.
assertEqual
(
sorted
([
'John'
for
i
in
range
(
num
)]),
sorted
([
'John'
for
i
in
range
(
num
)]),
...
...
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