summaryrefslogtreecommitdiff
path: root/oslo_utils/tests/test_imageutils.py
diff options
context:
space:
mode:
authorBrian Rosmaita <rosmaita.fossdev@gmail.com>2022-11-11 16:14:47 -0500
committerHervé Beraud <herveberaud.pro@gmail.com>2023-01-30 09:49:33 +0000
commit716c2e2b8e3ec640be2db6df93a611b0dbe06bc1 (patch)
tree886ac2295a987b0a1a51152838fd93384bfa8080 /oslo_utils/tests/test_imageutils.py
parentf04ba1459e614a4b84951c2025d434689810a972 (diff)
downloadoslo-utils-stable/zed.tar.gz
[imageutils] Fix __str__ for QemuImgInfostable/zed
Code is calling 'appened' on a list; correct this to 'append'. Closes-bug: #1996426 Change-Id: I8729cf180f92f43519c942e22f3b285377a5612f (cherry picked from commit d49d5944824f15d00e04e1b9c7f8c3b03b440c95)
Diffstat (limited to 'oslo_utils/tests/test_imageutils.py')
-rw-r--r--oslo_utils/tests/test_imageutils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/oslo_utils/tests/test_imageutils.py b/oslo_utils/tests/test_imageutils.py
index 5705ca8..952e067 100644
--- a/oslo_utils/tests/test_imageutils.py
+++ b/oslo_utils/tests/test_imageutils.py
@@ -264,6 +264,9 @@ class ImageUtilsJSONTestCase(test_base.BaseTestCase):
self.assertEqual(13168640, image_info.disk_size)
self.assertEqual("bar", image_info.format_specific["data"]["foo"])
self.assertEqual('yes', image_info.encrypted)
+ # test for Bug #1996426
+ expected_str = "format_specific: {'data': {'foo': 'bar'}}"
+ self.assertIn(expected_str, str(image_info))
@mock.patch("debtcollector.deprecate")
def test_qemu_img_info_blank(self, mock_deprecate):