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
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'))