Пример #1
0
 def test_userdel(self):
     """
     Test if it delete HTTP user using the ``htpasswd`` file
     """
     mock = MagicMock(return_value=True)
     with patch.dict(apache.__salt__, {"webutil.userdel": mock}):
         assert apache.userdel("htpasswd", "salt") is True
Пример #2
0
 def test_userdel(self):
     '''
     Test if it delete HTTP user using the ``htpasswd`` file
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(apache.__salt__, {'webutil.userdel': mock}):
         self.assertTrue(apache.userdel('htpasswd', 'salt'))
Пример #3
0
 def test_userdel(self):
     '''
     Test if it delete HTTP user using the ``htpasswd`` file
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(apache.__salt__, {'webutil.userdel': mock}):
         self.assertTrue(apache.userdel('htpasswd', 'salt'))