libvirt: Fix indentation in test__video_model_supported

This would previously result in
nova.virt.libvirt.host.Host.has_min_version not being correctly mocked
and would instead rely on the versions of libvirt and QEMU being
reported by FakeLibvirt being lower than
MIN_LIBVIRT_VIDEO_MODEL_VERSIONS['none'] aka libvirt v4.6.0.

Change-Id: I4624ff7dd1e71c8a9656e4ce2118fd04941a4086
This commit is contained in:
Lee Yarwood 2020-08-19 16:18:26 +01:00
parent cff7382fb3
commit 30c30f5a59

View File

@ -6623,12 +6623,12 @@ class LibvirtConnTestCase(test.NoDBTestCase,
min_version_mock.assert_called_with(lv_ver=ver)
else:
min_version_mock.assert_not_called()
# then assert that fake models fail
self.assertFalse(drvr._video_model_supported("fake"))
# finally if the min version is not met assert that
# the video model is not supported.
min_version_mock.return_value = False
self.assertFalse(drvr._video_model_supported("none"))
# then assert that fake models fail
self.assertFalse(drvr._video_model_supported("fake"))
# finally if the min version is not met assert that
# the video model is not supported.
min_version_mock.return_value = False
self.assertFalse(drvr._video_model_supported("none"))
@mock.patch.object(libvirt_driver.LibvirtDriver, '_video_model_supported')
def test__add_video_driver_gop(self, _supports_gop_video):