def test_Contributor(self): from clld.db.models.common import Contributor d = Contributor(id='abc') d.last_first() d = Contributor(id='abc', name='Robert Forkel') self.assertTrue(d.last_first().startswith('Forkel'))
def test_Contributor(): from clld.db.models.common import Contributor d = Contributor(id='abc') d.last_first() d = Contributor(id='abc', name='Robert Forkel') assert d.last_first() == 'Forkel, Robert' d = Contributor(id='abc', name='Hans Robert von Forkel') assert d.last_first() == 'von Forkel, Hans Robert'