]> xenbits.xensource.com Git - osstest/openstack-nova.git/commitdiff
Fix bug in "nova/tests/unit/virt/test_virt_drivers.py" for os-vif
authorMarkus Zoeller <mzoeller@de.ibm.com>
Thu, 13 Oct 2016 08:24:23 +0000 (10:24 +0200)
committerMarkus Zoeller <mzoeller@de.ibm.com>
Thu, 13 Oct 2016 08:24:23 +0000 (10:24 +0200)
Commit 735f710 moved the os_vif.initialize() code. This lead to an
error in "test_virt_drivers.LibvirtConnTestCase.test_set_admin_password":

  AttributeError: 'module' object has no attribute 'vif

This change initializes os_vif in "test_virt_driver" as it was done
for "libvirt.test_driver" in commit 735f710.

Change-Id: Idf2fcb1df92dd4aa1761d955ea149090263d42d8
Closes-Bug: #1632987

nova/tests/unit/virt/test_virt_drivers.py

index ed5684c3f036b5bb63485454f077634fc43a3865..ccfb8804cd5fbb4d025bcbe799300aaed2f4382b 100644 (file)
@@ -20,6 +20,7 @@ import traceback
 import fixtures
 import mock
 import netaddr
+import os_vif
 from oslo_log import log as logging
 from oslo_serialization import jsonutils
 from oslo_utils import importutils
@@ -250,6 +251,7 @@ class _VirtDriverTestCase(_FakeDriverBackendTestCase):
         # here; we test it in test_imagebackend.py
         self.stubs.Set(imagebackend.Image, 'resolve_driver_format',
                        imagebackend.Image._get_driver_format)
+        os_vif.initialize()
 
     def _get_running_instance(self, obj=True):
         instance_ref = test_utils.get_test_instance(obj=obj)