def test_server_poweroff(self): ''' Tests for powers down the managed server. ''' mock = MagicMock(return_value=True) with patch.object(drac, '__execute_cmd', mock): self.assertTrue(drac.server_poweroff())