

def test_parsecmdline(self):
    cmd = 'adduser root'.split(' ')
    content = 'root:x:0:0:root:/root:/bin/bash'
    uids = {
        
    }
    mngids.parse(content, uids)
    orig = mngids.call_addgroup
    mngids.call_addgroup = (lambda x: x)
    mngids.parse_cmdline(cmd, uids, {
        
    })
    mngids.call_addgroup = orig
    self.assertEquals(cmd[1], '--uid')
    self.assertEquals(cmd[2], '0')

dataset/ETHPy150Open redhat-cip/edeploy/build/test_mngids.py TestMngids.test_parsecmdline/original