Use assertEqual instead of assertEquals in unitttest

Bug #1218190 reported by ZhiQiang Fan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Jeff Peeler
OpenStack Identity (keystone)
Fix Released
Low
Dirk Mueller
python-keystoneclient
Fix Released
Low
Dirk Mueller
python-neutronclient
Fix Released
Undecided
ZhiQiang Fan

Bug Description

I noticed that [keystone, python-keystoneclient, python-neutronclient] configure tox.ini with py33 test, however, assertEquals is deprecated in py3 but ok with py2, so i think it is better to change all of assertEquals to assertEqual

ZhiQiang Fan (aji-zqfan)
Changed in keystone:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
Changed in python-neutronclient:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
Changed in python-keystoneclient:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
Revision history for this message
Dolph Mathews (dolph) wrote :

Can we support this via hacking before producing fixes? I'd rather just fix this kind of thing once.

Changed in keystone:
importance: Undecided → Low
Changed in python-keystoneclient:
importance: Undecided → Low
Changed in keystone:
status: New → Triaged
Changed in python-keystoneclient:
status: New → Triaged
Changed in python-neutronclient:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/44781

Changed in python-neutronclient:
status: Confirmed → In Progress
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

@Dolph Mathews:

https://github.com/openstack-dev/hacking/blob/master/hacking/core.py#L675
H602 is on master branch but not supported in hacking 0.7.0

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/44781
Committed: http://github.com/openstack/python-neutronclient/commit/3cabda68d9a2a0e3bb96166b05d5852da326a427
Submitter: Jenkins
Branch: master

commit 3cabda68d9a2a0e3bb96166b05d5852da326a427
Author: ZhiQiang Fan <email address hidden>
Date: Tue Sep 3 10:16:42 2013 +0800

    Use assertEqual instead of assertEquals

    For unittest, assertEquals is deprecated in py3, use assertEqual
    instead.

    Closes-Bug: #1218190
    Change-Id: I51d68578e4a2bf10230bc95fc5fa62762ae0acea

Changed in python-neutronclient:
status: In Progress → Fix Committed
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

Dirk Mueller has posted patch for keystone and keystoneclient
keystone: https://review.openstack.org/#/c/47148/
keystoneclient: https://review.openstack.org/#/c/46987/

Changed in keystone:
assignee: ZhiQiang Fan (aji-zqfan) → nobody
Changed in python-keystoneclient:
assignee: ZhiQiang Fan (aji-zqfan) → nobody
Changed in python-keystoneclient:
assignee: nobody → Sergio Cazzolato (sergio-j-cazzolato)
Changed in keystone:
assignee: nobody → Sergio Cazzolato (sergio-j-cazzolato)
Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

I reviewed the code for the unittests and I didn't see any "assertEquals" in the projects ​
  python-keystoneclient and keystone.

I think this bug should be closed for these modules.

Revision history for this message
Dolph Mathews (dolph) wrote :

Fixed in keystone in 5142d4f4c2afb8403bb743c404d7df5e239e64df

Changed in keystone:
assignee: Sergio Cazzolato (sergio-j-cazzolato) → Dirk Mueller (dmllr)
status: Triaged → Fix Committed
Revision history for this message
Dolph Mathews (dolph) wrote :

Fixed in python-keystoneclient in 2fbb1908288294cc621bfe805e7d57d002aee6d3

Changed in python-keystoneclient:
assignee: Sergio Cazzolato (sergio-j-cazzolato) → Dirk Mueller (dmllr)
status: Triaged → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Jeff Peeler (jpeeler-z)
Changed in heat:
milestone: none → icehouse-2
assignee: nobody → Jeff Peeler (jpeeler-z)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/61855
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=a3a4d31d2e7dd758577b22a8c61e9a4c75402120
Submitter: Jenkins
Branch: master

commit a3a4d31d2e7dd758577b22a8c61e9a4c75402120
Author: Jeff Peeler <email address hidden>
Date: Thu Dec 12 14:39:22 2013 -0500

    pep8 fix: assertEquals -> assertEqual

    Change is necessary due to update to hacking 0.8.0, which is in
    alignment with project standards.

    Change-Id: I012958e63d9e0efaf36ee57fe9102e835ef8533c
    Closes-bug: #1218190

Changed in heat:
status: In Progress → Fix Committed
Dolph Mathews (dolph)
Changed in python-keystoneclient:
milestone: none → 0.4.2
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Dolph Mathews (dolph)
Changed in python-keystoneclient:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-1 → 2014.1
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-2 → 2014.1
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
milestone: none → 2.3.0-2.3.4
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.