misused assertTrue in unit tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Undecided
|
ChangBo Guo(gcb) | ||
Ironic |
Fix Released
|
Medium
|
ChangBo Guo(gcb) | ||
OpenStack Heat |
Fix Released
|
Medium
|
ChangBo Guo(gcb) | ||
OpenStack Identity (keystone) |
Fix Released
|
Low
|
ChangBo Guo(gcb) | ||
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
ZhiQiang Fan | ||
oslo-incubator |
Fix Released
|
Medium
|
ChangBo Guo(gcb) | ||
python-keystoneclient |
Fix Released
|
Low
|
ChangBo Guo(gcb) | ||
tempest |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
1)signature for assertTure:
def failUnless(self, expr, msg=None):
"""Fail the test unless the expression is true."""
if not expr: raise self.failureExc
..
assert_ = assertTrue = failUnless
2) signature for assertEqual:
def failUnlessEqual
"""Fail if the two objects are unequal as determined by the '=='
"""
if not first == second:
raise self.failureExc
assertEqual = assertEquals = failUnlessEqual
assertTrue used to evaluate one expression
assertEqual used to compare two expressions
If passed two expressions to assertTrue , it always evaluate first expression . That 's not expected .
Changed in tempest: | |
assignee: | nobody → ChangBo Guo (guochbo) |
status: | New → In Progress |
Changed in keystone: | |
assignee: | nobody → ChangBo Guo (guochbo) |
status: | New → In Progress |
Changed in heat: | |
milestone: | none → havana-rc1 |
importance: | Undecided → Medium |
Changed in python-keystoneclient: | |
assignee: | nobody → ChangBo Guo (guochbo) |
Changed in python-keystoneclient: | |
importance: | Undecided → Low |
Changed in keystone: | |
importance: | Undecided → Low |
no longer affects: | melange |
no longer affects: | neutron |
Changed in cinder: | |
assignee: | nobody → ZhiQiang Fan (aji-zqfan) |
no longer affects: | cinder |
no longer affects: | cinder |
Changed in ironic: | |
importance: | Undecided → Medium |
Changed in oslo: | |
importance: | Undecided → Low |
importance: | Low → Medium |
Changed in oslo: | |
milestone: | none → havana-rc1 |
status: | Fix Committed → Fix Released |
Changed in keystone: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in swift: | |
milestone: | none → 1.10.0-rc1 |
status: | Fix Committed → Fix Released |
Changed in python-keystoneclient: | |
milestone: | 0.3.3 → 0.4.0 |
Changed in python-keystoneclient: | |
status: | Fix Committed → Fix Released |
Changed in oslo: | |
milestone: | havana-rc1 → 2013.2 |
Changed in heat: | |
milestone: | havana-rc1 → 2013.2 |
Changed in swift: | |
milestone: | 1.10.0-rc1 → 1.10.0 |
Changed in keystone: | |
milestone: | havana-rc1 → 2013.2 |
Changed in glance: | |
milestone: | none → icehouse-1 |
status: | Fix Committed → Fix Released |
Changed in ironic: | |
milestone: | none → icehouse-1 |
status: | Fix Committed → Fix Released |
Changed in tempest: | |
status: | Fix Committed → Fix Released |
assignee: | ChangBo Guo (guochbo) → nobody |
Changed in glance: | |
milestone: | icehouse-1 → 2014.1 |
Changed in ironic: | |
milestone: | icehouse-1 → 2014.1 |
Fix proposed to branch: master /review. openstack. org/46868
Review: https:/