示例#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'))