def test_say(self): ''' Test if it says some words. ''' mock = MagicMock(return_value={'retcode': 0}) with patch.dict(mac_desktop.__salt__, {'cmd.run_all': mock}): self.assertTrue(mac_desktop.say())
def test_say(): """ Test if it says some words. """ mock = MagicMock(return_value={"retcode": 0}) with patch.dict(mac_desktop.__salt__, {"cmd.run_all": mock}): assert mac_desktop.say()