Esempio n. 1
0
 def test_full_name(self):
     self.assertEqual(full_name('RNDr.', 'Pepa', 'Jahoda', 'PhD.'),
                      'RNDr. Pepa Jahoda, PhD.')
     self.assertEqual(full_name(None, 'Pepa', 'Jahoda', None),
                      'Pepa Jahoda')
     self.assertEqual(full_name(None, u'Někdo', u'Hruška', None),
                      u'Někdo Hruška')
     self.assertEqual(full_name(None, 'Pepa', 'Jahoda', ''),
                      u'Pepa Jahoda')
     self.assertEqual(full_name('Prof. Mgr. et Bc.', 'Pepa', 'Jahoda', None),
                      'Prof. Mgr. et Bc. Pepa Jahoda')
     self.assertEqual(full_name('', 'Pepa', 'Jahoda', None),
                      'Pepa Jahoda')
Esempio n. 2
0
File: person.py Progetto: FUUK/fuuk
 def full_name(self):
     return full_name(self.prefix, self.first_name, self.last_name, self.suffix)