From f3698f57edfc1ba445dd5e52668379686fdf32db Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Fri, 26 Aug 2016 16:08:28 +0100 Subject: [PATCH] Fix iboot mock The iboot mock was pointing to the iboot module in Ironic (ironic.drivers.modules.iboot), this patch is changing it to point to the module in ironic-staging-drivers otherwise, once iboot is removed from the Ironic tree it's likely to break the unittests in this project. Change-Id: I85fbfa9a83143ad309ae0cf6d5d45c8b7e45391e --- .../tests/unit/third_party_driver_mocks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ironic_staging_drivers/tests/unit/third_party_driver_mocks.py b/ironic_staging_drivers/tests/unit/third_party_driver_mocks.py index 524ce73..8984459 100644 --- a/ironic_staging_drivers/tests/unit/third_party_driver_mocks.py +++ b/ironic_staging_drivers/tests/unit/third_party_driver_mocks.py @@ -45,8 +45,9 @@ if not iboot: # if anything has loaded the iboot driver yet, reload it now that the # external library has been mocked -if 'ironic.drivers.modules.iboot' in sys.modules: - six.moves.reload_module(sys.modules['ironic.drivers.modules.iboot']) +if 'ironic_staging_drivers.iboot.power' in sys.modules: + six.moves.reload_module( + sys.modules['ironic_staging_drivers.iboot.power']) # attempt to load the external 'libvirt' library, which is required by # the optional drivers.modules.libvirt module