Esempio n. 1
0
def test_add_sudo():
    tmpuser = config.core.user
    try:
        config.core.user = '******'
        assert utils.add_sudo('ls').startswith('sudo')
        config.core.user = ''
        assert utils.add_sudo('ls') == 'ls'
    finally:
        config.core.user = tmpuser
Esempio n. 2
0
def test_add_sudo():
    tmpuser = config.core.user
    try:
        config.core.user = '******'
        assert utils.add_sudo('ls').startswith('sudo')
        config.core.user = ''
        assert utils.add_sudo('ls') == 'ls'
    finally:
        config.core.user = tmpuser