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: I5904b82d80d6011c1c3f220c357cc14e8d98da61
Closes-Bug: #1499369
(cherry picked from commit aeea4ec943caddac3fc74f4b1d3dce603f0b251f)
Reviewed: https:/ /review. openstack. org/266653 /git.openstack. org/cgit/ openstack/ python- heatclient/ commit/ ?id=f0877c532e3 dc7b1a774ca89a8 74c6ba7be2d925
Committed: https:/
Submitter: Jenkins
Branch: stable/liberty
commit f0877c532e3dc7b 1a774ca89a874c6 ba7be2d925
Author: Rui Chen <email address hidden>
Date: Tue Dec 1 20:16:34 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: I5904b82d80d601 1c1c3f220c357cc 14e8d98da61 c3fc74f4b1d3dce 603f0b251f)
Closes-Bug: #1499369
(cherry picked from commit aeea4ec943cadda