get_person_title method on held position

This commit is contained in:
Thomas Desvenain 2013-09-12 17:43:50 +02:00
parent cba108d80b
commit 426b665758
2 changed files with 7 additions and 2 deletions

View File

@ -137,7 +137,7 @@ class HeldPosition(Container):
It is constituted by the person's who held the position name,
the root organization and the position name (if any)
"""
person_name = self.get_person().get_title()
person_name = self.get_person_title()
root_organization = self.get_organization().get_root_organization().title
position = self.get_position()
if position is None and not self.label:
@ -153,7 +153,10 @@ class HeldPosition(Container):
return u"%s (%s - %s)" % (person_name,
root_organization,
position_name)
def get_person_title(self):
return self.get_person().get_title()
@acqproperty
def photo(self):
"""Get photo from Person"""

View File

@ -184,6 +184,8 @@ class TestHeldPosition(TestContentTypes):
u"Général Charles De Gaulle (Armée de terre - Général de l'armée de terre)")
self.assertEqual(self.sergent_pepper.get_full_title(),
u"Sergent Pepper (Armée de terre - Sergent de la brigade LH)")
self.assertEqual(self.gadt.get_person_title(),
u"Général Charles De Gaulle")
def test_get_person(self):
pass