Replace assertEquals to assertEqual

Bug #1221601 reported by Zhongyue Luo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Zhongyue Luo

Bug Description

The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases

Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.

Tags: unittest
Zhongyue Luo (zyluo)
Changed in neutron:
assignee: nobody → Zhongyue Luo (zyluo)
Changed in neutron:
status: New → In Progress
Zhongyue Luo (zyluo)
summary: - Test scripts not using the right methods
+ Replace assertEquals to assertEqual
description: updated
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

when would the hacking 0.8 be released? i think it is better to let hacking do this check automatically, currently, i agree with you, but regularly fix this issue (along with the assertTrue/assertFalse) is not efficient, so could you contact the maintainers of hacking? or we could introduce hacking hook like nova does (which is deprecated by Mark McClain)

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

Reviewed: https://review.openstack.org/45385
Committed: http://github.com/openstack/neutron/commit/902dc88b4c511859f164fed4c4ac8ce0c60b09ee
Submitter: Jenkins
Branch: master

commit 902dc88b4c511859f164fed4c4ac8ce0c60b09ee
Author: Zhongyue Luo <email address hidden>
Date: Fri Sep 6 15:27:20 2013 +0800

    Replace assertEquals with assertEqual

    The method assertEquals has been deprecated since python 2.7.
    http://docs.python.org/2/library/unittest.html#deprecated-aliases

    Also in Python 3, a deprecated warning is raised when using assertEquals
    therefore we should use assertEqual instead.

    Fixes bug #1221601

    Change-Id: Id502cfbc210c6c3fe0a256d5350e159ffa220141

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
importance: Undecided → Low
milestone: none → havana-rc1
tags: added: unittest
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-rc1 → 2013.2
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.