From 8e5c35d897edda7f10917885758d1a9efd6d0d40 Mon Sep 17 00:00:00 2001 From: Sirushti Murugesan Date: Tue, 24 Mar 2015 20:25:11 +0530 Subject: [PATCH] Remove return for rpc casts in rpc worker client RPC casts never return anything, only RPC calls do, so remove the misleading return in the worker client. Change-Id: I82e2ead0b350be42f808f6cb6b9b57b786aeadcf --- heat/rpc/worker_client.py | 2 +- heat/tests/test_rpc_worker_client.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/heat/rpc/worker_client.py b/heat/rpc/worker_client.py index 24d8fd64ed..5855ddfacb 100644 --- a/heat/rpc/worker_client.py +++ b/heat/rpc/worker_client.py @@ -46,4 +46,4 @@ class WorkerClient(object): client = self._client.prepare(version=version) else: client = self._client - return client.cast(ctxt, method, **kwargs) + client.cast(ctxt, method, **kwargs) diff --git a/heat/tests/test_rpc_worker_client.py b/heat/tests/test_rpc_worker_client.py index 75b25f1d70..182917bff9 100644 --- a/heat/tests/test_rpc_worker_client.py +++ b/heat/tests/test_rpc_worker_client.py @@ -58,14 +58,16 @@ class WorkerClientTest(common.HeatTestCase): msg = method, kwargs # go with default version - worker_client.cast(mock_cnxt, msg) + return_value = worker_client.cast(mock_cnxt, msg) + self.assertIsNone(return_value) mock_rpc_client.cast.assert_called_once_with(mock_cnxt, method, **kwargs) # Check cast in given version version = '1.2' - worker_client.cast(mock_cnxt, msg, version) + return_value = worker_client.cast(mock_cnxt, msg, version) + self.assertIsNone(return_value) mock_rpc_client.prepare.assert_called_once_with(version=version) mock_rpc_client.cast.assert_called_once_with(mock_cnxt, method,