Esempio n. 1
0
 def test_delete(self):
     """
     Test for deleting a user
     """
     mock = MagicMock(return_value=0)
     with patch.dict(pw_user.__salt__, {"cmd.retcode": mock}):
         self.assertTrue(pw_user.delete("A"))
Esempio n. 2
0
 def test_delete(self):
     '''
     Test for deleting a user
     '''
     mock = MagicMock(return_value={'retcode': 0})
     with patch.dict(pw_user.__salt__, {'cmd.run_all': mock}):
         self.assertTrue(pw_user.delete('A'), 1)
Esempio n. 3
0
 def test_delete(self):
     '''
     Test for deleting a user
     '''
     mock = MagicMock(return_value=0)
     with patch.dict(pw_user.__salt__, {'cmd.retcode': mock}):
         self.assertTrue(pw_user.delete('A'))