Fix Resource.__eq__ mismatch semantics of object equal
The __eq__ of apiclient.base.Resource will return True,
if the two objects have same id, even if they have different
other attributes value. The behavior is weird and don't
match the semantics of object equal. The objects that have
different value should be different objects.
Fix this issue and add some test cases in this patch.
Reviewed: https:/ /review. openstack. org/251841 /git.openstack. org/cgit/ openstack/ python- keystoneclient/ commit/ ?id=fcbb2d72489 9e265e168100718 399f7886f3f1f5
Committed: https:/
Submitter: Jenkins
Branch: master
commit fcbb2d724899e26 5e168100718399f 7886f3f1f5
Author: Rui Chen <email address hidden>
Date: Tue Dec 1 20:32:51 2015 +0800
Fix Resource.__eq__ mismatch semantics of object equal
The __eq__ of apiclient. base.Resource will return True,
if the two objects have same id, even if they have different
other attributes value. The behavior is weird and don't
match the semantics of object equal. The objects that have
different value should be different objects.
Fix this issue and add some test cases in this patch.
Change-Id: I1565c6e66d6dd6 cf7bd2b7e852615 7190deb45de
Closes-Bug: #1499369