From 5abf5109009359ea1ef49cd7ac59b50a4f55dfbf Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 28 Jun 2012 11:31:56 +0100 Subject: Fix regression in test_connection_to_primitive libvirt testcase Commit aa9a592abcbfabad4d2a3f8bb49d1b28d7724262, which renamed the libvirt module from 'connection' -> 'driver', accidentally introduced a flaw in the test_connection_to_primitive libvirt testcase. The original code in that test case was connection = nova.virt.libvirt.connection.LibvirtDriver('') jsonutils.to_primitive(connection._conn, convert_instances=True) Notice how the second line is using the '_conn' attribute on the LibvirtDriver *object instance* Now the new code is connection = libvirt_driver.LibvirtDriver('') jsonutils.to_primitive(libvirt_driver._conn, convert_instances=True) Notice how the second line is using the '_conn' attribute on the LibvirtDriver *class*. Predictably this causes the testcase to fail due to the '_conn' attribute not existing. Change-Id: Ie35718ea0c50648938effc53d67a110f280644d6 Signed-off-by: Daniel P. Berrange --- nova/tests/test_libvirt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index 510bcad7c..2bc20d2b0 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -2811,4 +2811,4 @@ class LibvirtNonblockingTestCase(test.TestCase): """Test bug 962840""" import nova.virt.libvirt.driver as libvirt_driver connection = libvirt_driver.LibvirtDriver('') - jsonutils.to_primitive(libvirt_driver._conn, convert_instances=True) + jsonutils.to_primitive(connection._conn, convert_instances=True) -- cgit