Use assertIn and assertNotIn
Bug #1510007 reported by
Bertrand Lallau
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Designate |
Fix Released
|
Undecided
|
Bertrand Lallau | ||
Ironic |
Fix Released
|
Low
|
Unassigned | ||
Magnum |
Fix Released
|
Undecided
|
Bertrand Lallau | ||
ironic-python-agent |
Fix Released
|
Low
|
edan david |
Bug Description
Tests should use:
self.
self.
instead of:
self.
self.
because assertIn and assertNotIn raise more meaningful errors:
self.assertIn(3, [1, 2]
>>> MismatchError: 3 not in [1, 2]
self.assertTrue(3 in [1, 2])
>>> AssertionError: False is not true
Changed in magnum: | |
assignee: | nobody → Bertrand Lallau (bertrand-lallau) |
status: | New → In Progress |
Changed in heat: | |
assignee: | nobody → Bertrand Lallau (bertrand-lallau) |
status: | New → In Progress |
Changed in designate: | |
assignee: | nobody → Bertrand Lallau (bertrand-lallau) |
status: | New → In Progress |
Changed in magnum: | |
milestone: | none → mitaka-1 |
status: | Fix Committed → Fix Released |
Changed in designate: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
status: | Fix Committed → Fix Released |
tags: | added: low-hanging-fruit |
Changed in ironic: | |
assignee: | nobody → Ramamani Yeleswarapu (ramamani-yeleswarapu) |
Changed in ironic: | |
status: | New → Triaged |
importance: | Undecided → Low |
affects: | ironic → ironic-python-agent |
Changed in ironic: | |
importance: | Undecided → Low |
no longer affects: | heat |
To post a comment you must log in.
Related fix proposed to branch: master /review. openstack. org/239417
Review: https:/