Use assertNotEqual instead of assertNotEquals in unit tests

Bug #1256737 reported by Sergio Cazzolato on 2013-12-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Avishay Traeger

Bug Description

The method assertNotEquals has been deprecated.

In Python 3, a deprecated warning is raised when using assertNotEquals
therefore we should use assertNotEqual instead.

summary: - 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.
+ Use assertEqual instead of assertEquals in unitttest
Changed in python-cinderclient:
assignee: nobody → Sergio Cazzolato (sergio-j-cazzolato)
affects: python-cinderclient → cinder
summary: - Use assertEqual instead of assertEquals in unitttest
+ Use assertNotEqual instead of assertNotEquals in unitttest
description: updated
description: updated
description: updated

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

Changed in cinder:
status: New → In Progress
summary: - Use assertNotEqual instead of assertNotEquals in unitttest
+ Use assertNotEqual instead of assertNotEquals in unit tests

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

Changed in cinder:
assignee: Sergio Cazzolato (sergio-j-cazzolato) → Avishay Traeger (avishay-il)

Reviewed: https://review.openstack.org/59643
Committed: http://github.com/openstack/cinder/commit/aa453576ff13c97c63dcb3cd5941675ffdc93360
Submitter: Jenkins
Branch: master

commit aa453576ff13c97c63dcb3cd5941675ffdc93360
Author: Avishay Traeger <email address hidden>
Date: Tue Dec 3 09:44:35 2013 +0200

    Update hacking to hacking>=0.8.0,<0.9

    Update hacking version to match version specified in requirements repo.

    Fixed the following issues, which the newer version checks for:
    print "" -> print("")
    self.assertEquals -> self.assertEqual
    self.assertNotEquals -> self.assertNotEqual

    Change-Id: Ic4b70fd8f565cda28e23fe6b1da0e278f949373c
    Closes-Bug: #1256738
    Closes-Bug: #1256737
    Closes-Bug: #1257274

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2014-01-22
Changed in cinder:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers