ironic/ironic/tests/unit/drivers/modules/drac
Richard Pioso 6d6cf18f31 DRAC get_bios_config() passthru causes exception
The DRAC driver's (pxe_drac) get_bios_config() vendor passthru method
raises an AttributeError exception. It no longer returns the current
BIOS configuration. This is a regression from stable/mitaka.

Triage found that get_bios_config() mistakenly treats the value returned
by python-dracclient's list_bios_settings() as containing named tuples.
When it calls the namedtuple _asdict() method, an AttributeError
exception is raised.

Revert get_bios_config()'s handling of the return value to use __dict__.
Remove the comment that is not consistent with the implementation.

Also revert the unit test case for a successful call to use mock to
create the return value. Use mock.NonCallableMock with an empty
specification (spec) to catch this type of bug in the future.

Change-Id: I94afaa72a1ef25efc1b622e29e3a92a5d27f1892
Closes-Bug: #1637671
2016-10-31 15:00:32 -04:00
..
__init__.py Move unit tests to correct directory 2015-09-30 17:47:19 -07:00
test_bios.py DRAC get_bios_config() passthru causes exception 2016-10-31 15:00:32 -04:00
test_common.py Improve tests for driver's parse_driver_info() 2016-06-27 16:15:05 -05:00
test_deploy.py Fix DRAC failure during automated cleaning 2016-09-13 10:19:27 +02:00
test_inspect.py Fix nits on DRAC OOB inspection patch 2016-09-13 11:18:32 +02:00
test_job.py DRAC: list unfinished jobs 2016-09-21 15:46:46 +01:00
test_management.py DRAC RAID configuration 2016-08-30 10:23:03 +02:00
test_periodic_task.py DRAC RAID configuration 2016-08-30 10:23:03 +02:00
test_power.py DRAC: switch to python-dracclient on power interface 2015-12-15 14:11:20 +01:00
test_raid.py DRAC RAID configuration 2016-08-30 10:23:03 +02:00
utils.py DRAC OOB inspection 2016-09-02 12:08:38 +02:00