attrs_exist() misleadingly checks expected_attrs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack DBaaS (Trove) |
Fix Released
|
Low
|
mariam john |
Bug Description
The name "expected_attrs" is misleading. If you look at the code, it's more like "allowed_attrs".
For example:
list = [type]
expected_attrs = [type, version]
There are no failures. But based on the name "expected_attrs"... I am expecting that "list" has all of the attributes in "expected_attrs".
The proposal for this bug is:
1) Add a more strict function that actually does check for all of the expected attributes in list. Something like this:
def contains_
for attr in expected_attrs:
if attr not in list:
2) Refactor attrs_exist() to contains_
Changed in trove: | |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in trove: | |
assignee: | nobody → mariam john (mariamj) |
Changed in trove: | |
milestone: | none → juno-rc1 |
Changed in trove: | |
status: | Fix Committed → Fix Released |
Changed in trove: | |
milestone: | kilo-1 → 2015.1.0 |
Fix proposed to branch: master /review. openstack. org/121018
Review: https:/