Exemplo n.º 1
0
 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': ''})
Exemplo n.º 2
0
 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': ''
         })
Exemplo n.º 3
0
 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': ''})
Exemplo n.º 4
0
 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": "",
             },
         )