# Path: databot/shell.py
# def name_to_attr(name):
#     # Transliterate everything to ASCII
#     name = unidecode(name)
# 
#     # Attributes can't start with number
#     if name and name[0].isdigit():
#         name = '_' + name
# 
#     # Replace all non alphanumeric characters to '_'
#     name = name_re.sub('_', name)
# 
#     return name


from databot.shell import name_to_attr


def test_name_to_attr():
    assert name_to_attr('name') == 'name'
    assert name_to_attr('two words') == 'two_words'

# Path: databot/shell.py
# def name_to_attr(name):
#     # Transliterate everything to ASCII
#     name = unidecode(name)
# 
#     # Attributes can't start with number
#     if name and name[0].isdigit():
#         name = '_' + name
# 
#     # Replace all non alphanumeric characters to '_'
#     name = name_re.sub('_', name)
# 
#     return name


# Path: tests/test_shell.py
from databot.shell import name_to_attr



def test_name_to_attr():
    assert name_to_attr('name') == 'name'
    assert name_to_attr('two words') == 'two_words'

    assert name_to_attr('lietuviškas žodis') == 'lietuviskas_zodis'