diff options
author | Russell Bryant <rbryant@redhat.com> | 2012-11-05 12:58:25 -0500 |
---|---|---|
committer | Russell Bryant <rbryant@redhat.com> | 2012-11-05 12:58:25 -0500 |
commit | 2f7503372467d9998b67e2c58ffaf51733329944 (patch) | |
tree | f1620c6f914fca0b26c86dbe94c1d21b46e80ae7 /tests/unit/rpc | |
parent | d41e45b9946fc0dd4d1a2c90a848d1f92d58fc11 (diff) | |
download | oslo-2f7503372467d9998b67e2c58ffaf51733329944.tar.gz oslo-2f7503372467d9998b67e2c58ffaf51733329944.tar.xz oslo-2f7503372467d9998b67e2c58ffaf51733329944.zip |
Tweak rpc.queue_get_for to deal with host=None.
Make rpc.queue_get_for() just a tad more convenient by dealing with the
case of host=None. In that case, just return the base topic.
Change-Id: I2f55c2205c219df7481dd6e507caf7182622195b
Diffstat (limited to 'tests/unit/rpc')
-rw-r--r-- | tests/unit/rpc/test_common.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unit/rpc/test_common.py b/tests/unit/rpc/test_common.py index 2066a64..80b717b 100644 --- a/tests/unit/rpc/test_common.py +++ b/tests/unit/rpc/test_common.py @@ -167,3 +167,7 @@ class RpcCommonTestCase(test_utils.BaseTestCase): importutils.import_module = orig_import_module self.assertEqual(self.mod, 'nova.openstack.common.rpc.impl_qpid') + + def test_queue_get_for(self): + self.assertEqual(rpc.queue_get_for(None, 'a', 'b'), 'a.b') + self.assertEqual(rpc.queue_get_for(None, 'a', None), 'a') |