def test_format_info(self): ''' Tests the formatting of returned group information ''' data = grp.struct_group(('wheel', '*', 0, ['root'])) ret = {'passwd': '*', 'gid': 0, 'name': 'test', 'members': ['root']} self.assertDictEqual(groupadd._format_info(data), ret)
def test_format_info(self): """ Tests the formatting of returned group information """ data = grp.struct_group(("wheel", "*", 0, ["root"])) ret = {"passwd": "*", "gid": 0, "name": "test", "members": ["root"]} self.assertDictEqual(groupadd._format_info(data), ret)
def test_format_info(self): ''' Tests the formatting of returned group information ''' group = {'passwd': '*', 'gid': 0, 'name': 'test', 'members': ['root']} with patch('salt.modules.groupadd._format_info', MagicMock(return_value=group)): data = grp.struct_group(('wheel', '*', 0, ['root'])) ret = {'passwd': '*', 'gid': 0, 'name': 'test', 'members': ['root']} self.assertDictEqual(groupadd._format_info(data), ret)
def test_format_info(self): """ Tests the formatting of returned group information """ group = {"passwd": "*", "gid": 0, "name": "test", "members": ["root"]} with patch("salt.modules.groupadd._format_info", MagicMock(return_value=group)): data = grp.struct_group(("wheel", "*", 0, ["root"])) ret = {"passwd": "*", "gid": 0, "name": "test", "members": ["root"]} self.assertDictEqual(groupadd._format_info(data), ret)