diff --git a/openstack/common/messaging/target.py b/openstack/common/messaging/target.py index 5f3d23e8e..21b7d36cd 100644 --- a/openstack/common/messaging/target.py +++ b/openstack/common/messaging/target.py @@ -77,6 +77,9 @@ class Target(object): kwargs.setdefault('fanout', self.fanout) return Target(**kwargs) + def __eq__(self, other): + return vars(self) == vars(other) + def __repr__(self): attrs = [] for a in ['exchange', 'topic', 'namespace', diff --git a/tests/unit/messaging/test_rpc_client.py b/tests/unit/messaging/test_rpc_client.py new file mode 100644 index 000000000..4f0c2fe93 --- /dev/null +++ b/tests/unit/messaging/test_rpc_client.py @@ -0,0 +1,16 @@ + +# Copyright 2013 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +