misused asserts in unittests

Bug #1445131 reported by Elvis Teixeira
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
In Progress
Low
Kairo Araujo

Bug Description

In the trove unit tests there are some assertEquals("Something", True/False) where the
python methods assertTrue() and assertFalse() would be used. Change this to be compliant
with the unittest module's idiom and make any reader explicitly know we are checking for a
boolean condition. Maybe writing a hack rule to prevent reintroduction of code like that
would also be fine.

Changed in trove:
assignee: nobody → Elvis Teixeira (elvis-teixeira)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

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

Changed in trove:
assignee: Elvis Teixeira (elvis-teixeira) → Sushil Kumar (sushil-kumar2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/178184
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=063de3a18bfbc314564994ac3a8d0bb78488436a
Submitter: Jenkins
Branch: master

commit 063de3a18bfbc314564994ac3a8d0bb78488436a
Author: Sushil Kumar <email address hidden>
Date: Tue Apr 28 13:17:55 2015 +0000

    Corrects order of parameters to assertEqual

    The correct order of parameters to assertEqual is (expected,
    actual).
    It makes the assertion message more meaningful when there is
    a failure.

    Change-Id: I1ad41bcbec30442785f4cdabb234980e336312d5
    Closes-Bug: #1277104
    Partial-Bug: #1445131

Changed in trove:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by amrith (<email address hidden>) on branch: master
Review: https://review.openstack.org/196980
Reason: it's been a while since I asked about abandoning this.

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

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

Changed in trove:
assignee: Sushil Kumar (sushil-kumar2) → Kairo Araujo (kairo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by amrith (<email address hidden>) on branch: master
Review: https://review.openstack.org/283213
Reason: per previous comment and inactivity

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.