Add full python path to test stubbing modules for libvirt
libvirt test modules were relatively addressed (import fakelibvirt etc.) and this meant that running the test specifically (./run_tests test_virt_drivers) would fail with missing imports. Change-Id: I81f019bf635e10ca90f77f7a30b2e19065fee8f4
This commit is contained in:
		@@ -18,7 +18,7 @@ from nova import test
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from lxml import etree
 | 
					from lxml import etree
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import fakelibvirt as libvirt
 | 
					import nova.tests.fakelibvirt as libvirt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def get_vm_xml(name="testname", uuid=None, source_type='file',
 | 
					def get_vm_xml(name="testname", uuid=None, source_type='file',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,9 +63,9 @@ class _FakeDriverBackendTestCase(test.TestCase):
 | 
				
			|||||||
        else:
 | 
					        else:
 | 
				
			||||||
            self.saved_libvirt = None
 | 
					            self.saved_libvirt = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        import fake_imagebackend
 | 
					        import nova.tests.fake_imagebackend as fake_imagebackend
 | 
				
			||||||
        import fake_libvirt_utils
 | 
					        import nova.tests.fake_libvirt_utils as fake_libvirt_utils
 | 
				
			||||||
        import fakelibvirt
 | 
					        import nova.tests.fakelibvirt as fakelibvirt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        sys.modules['libvirt'] = fakelibvirt
 | 
					        sys.modules['libvirt'] = fakelibvirt
 | 
				
			||||||
        import nova.virt.libvirt.driver
 | 
					        import nova.virt.libvirt.driver
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user