sample_data_utils/people.py
def last_name(languages=None):
    """
        return a random last name

    >>> from mock import patch
    >>> with patch('%s._get_lastnames' % __name__, lambda *args: ['aaa']):
    ...     last_name()
    'Aaa'
    >>> with patch('%s.get_lastnames' % __name__, lambda lang: ['%s_lastname'% lang]):
    ...     last_name(['it'])
    'It_Lastname'
    """
    choices = []
    languages = languages or ['en']
    for lang in languages:
        samples = _get_lastnames(lang)
        choices.extend(samples)
    return random.choice(choices).title()
def last_name(languages=None):
    """
        return a random last name

    >>> from mock import patch
    >>> with patch('%s._get_lastnames' % __name__, lambda *args: ['aaa']):
    ...     last_name()
    'Aaa'
    >>> with patch('%s.get_lastnames' % __name__, lambda lang: ['%s_lastname'% lang]):
    ...     last_name(['it'])
    'It_Lastname'
    """
    choices = []
    languages = languages or ['en']
    for lang in languages:
        samples = _get_lastnames(lang)
        choices.extend(samples)
    return random.choice(choices).title()
return a random last name

    >>> from mock import patch
    >>> with patch('%s._get_lastnames' % __name__, lambda *args: ['aaa']):
    ...     last_name()
    'Aaa'
    >>> with patch('%s.get_lastnames' % __name__, lambda lang: ['%s_lastname'% lang]):
    ...     last_name(['it'])
    'It_Lastname'