def test_info(self): ''' Test if it return information for the specified user ''' self.assertDictEqual(win_shadow.info('SALT'), {'name': 'SALT', 'passwd': '', 'lstchg': '', 'min': '', 'max': '', 'warn': '', 'inact': '', 'expire': ''})
def test_info(self): ''' Test if it return information for the specified user ''' self.assertDictEqual( win_shadow.info('SALT'), { 'name': 'SALT', 'passwd': '', 'lstchg': '', 'min': '', 'max': '', 'warn': '', 'inact': '', 'expire': '' })
def test_info(self): ''' Test if it return information for the specified user ''' mock_user_info = MagicMock(return_value={'name': 'SALT', 'password_changed': '', 'expiration_date': ''}) with patch.dict(win_shadow.__salt__, {'user.info': mock_user_info}): self.assertDictEqual(win_shadow.info('SALT'), {'name': 'SALT', 'passwd': 'Unavailable', 'lstchg': '', 'min': '', 'max': '', 'warn': '', 'inact': '', 'expire': ''})
def test_info(self): """ Test if it return information for the specified user """ mock_user_info = MagicMock(return_value={ "name": "SALT", "password_changed": "", "expiration_date": "" }) with patch.dict(win_shadow.__salt__, {"user.info": mock_user_info}): self.assertDictEqual( win_shadow.info("SALT"), { "name": "SALT", "passwd": "Unavailable", "lstchg": "", "min": "", "max": "", "warn": "", "inact": "", "expire": "", }, )