Fix bug in "nova/tests/unit/virt/test_virt_drivers.py" for os-vif
Commit735f710
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 commit735f710
. Change-Id: Idf2fcb1df92dd4aa1761d955ea149090263d42d8 Closes-Bug: #1632987
This commit is contained in:
parent
bc1b11fdc2
commit
f022d57548
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue