def test_syslog(self): ''' Tests for configure syslog remote logging, by default syslog will automatically be enabled if a server is specified. However, if you want to disable syslog you will need to specify a server followed by False ''' mock = MagicMock(return_value=True) with patch.object(drac, '__execute_cmd', mock): self.assertTrue(drac.syslog('server')) mock = MagicMock(return_value=True) with patch.object(drac, '__execute_cmd', mock): self.assertTrue(drac.syslog('server', False))