diff options
author | Matthew Sherborne <msherborne@gmail.com> | 2013-03-06 08:03:10 +1000 |
---|---|---|
committer | Matthew Sherborne <msherborne@gmail.com> | 2013-03-06 08:53:05 +1000 |
commit | dd8c052ecb541c8c950427cd79a2292d4356748c (patch) | |
tree | 28b1a84a43d73836307741faebe3e5a612c1cecf /tests/unit/rpc | |
parent | 2cb8e4557b05f92fbd9f56b7a6a6d4f35c8a883a (diff) | |
download | oslo-dd8c052ecb541c8c950427cd79a2292d4356748c.tar.gz oslo-dd8c052ecb541c8c950427cd79a2292d4356748c.tar.xz oslo-dd8c052ecb541c8c950427cd79a2292d4356748c.zip |
Simple code cleanup
* Fix an exception that was raising a tuple
* Remove unused imports
* Remove unused exceptions
* Remove extra blank lines
Change-Id: I9127be991e9081dc173525c9b57ea297f389d16d
Diffstat (limited to 'tests/unit/rpc')
-rw-r--r-- | tests/unit/rpc/common.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/unit/rpc/common.py b/tests/unit/rpc/common.py index 5a2af19..c4362b2 100644 --- a/tests/unit/rpc/common.py +++ b/tests/unit/rpc/common.py @@ -24,12 +24,10 @@ import time import datetime import eventlet -from eventlet import greenthread from oslo.config import cfg from openstack.common import exception from openstack.common.gettextutils import _ -from openstack.common import jsonutils from openstack.common.rpc import common as rpc_common from openstack.common.rpc import dispatcher as rpc_dispatcher from tests import utils as test_utils @@ -231,10 +229,10 @@ class BaseRpcTestCase(test_utils.BaseTestCase): self.assertEqual(value, result) def test_call_timeout(self): + """Make sure rpc.call will time out.""" if not self.rpc: self.skipTest('rpc driver not available.') - """Make sure rpc.call will time out.""" if not self.supports_timeouts: self.skipTest(_("RPC backend does not support timeouts")) @@ -252,7 +250,7 @@ class BaseRpcTestCase(test_utils.BaseTestCase): "args": {"value": value}}, timeout=1) self.fail("should have thrown Timeout") - except rpc_common.Timeout as exc: + except rpc_common.Timeout: pass def test_multithreaded_resp_routing(self): @@ -295,7 +293,7 @@ def rpc_wrapper(callid, func, *args): """ try: ret = func(*args) - except rpc_common.Timeout as exc: + except rpc_common.Timeout: synced_echo_call.wait(callid) ret = None return ret |