def test_info(self): ''' Tests to return information about a group ''' self.assertDictEqual(pw_group.info('name'), {}) mock = MagicMock(return_value={'gr_name': 'A', 'gr_passwd': 'B', 'gr_gid': 1, 'gr_mem': ['C', 'D']}) with patch.dict(pw_group.grinfo, mock): self.assertDictEqual(pw_group.info('name'), {})
def test_info(): """ Tests to return information about a group """ assert pw_group.info("name") == {} mock = MagicMock(return_value={ "gr_name": "A", "gr_passwd": "B", "gr_gid": 1, "gr_mem": ["C", "D"], }) with patch.dict(pw_group.grinfo, mock): assert pw_group.info("name") == {}
def test_info(self): """ Tests to return information about a group """ self.assertDictEqual(pw_group.info("name"), {}) mock = MagicMock(return_value={ "gr_name": "A", "gr_passwd": "B", "gr_gid": 1, "gr_mem": ["C", "D"], }) with patch.dict(pw_group.grinfo, mock): self.assertDictEqual(pw_group.info("name"), {})