principal = etree.Element('principal')
principal.text = 'fakeu'
principal.attrib['type'] = 'user'
+ group = etree.Element('principal')
+ group.text = 'fakeg'
+ group.attrib['type'] = 'group'
principal_list.append(principal)
+ principal_list.append(group)
sudoers_entry.append(principal_list)
data.append(sudoers_entry)
policysetting.append(data)
self.assertTrue(ret, 'Could not create the target %s' % manifest)
# Process all gpos, with temp output directory
- data = 'fakeu ALL=(ALL) NOPASSWD: ALL'
+ data = 'fakeu,fakeg% ALL=(ALL) NOPASSWD: ALL'
with TemporaryDirectory() as dname:
ext.process_group_policy([], gpos, dname)
sudoers = os.listdir(dname)