From 38cc2f79a0d195afa0321be88220dbe7702de4f8 Mon Sep 17 00:00:00 2001 From: Stepan Oksanichenko Date: Sun, 8 Sep 2024 12:01:32 +0300 Subject: [PATCH] - Unittests are fixed --- tests/test_util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_util.py b/tests/test_util.py index 52948d42..4934bd18 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -375,15 +375,15 @@ class TestVolumeIdGenerator(unittest.TestCase): ], "image_volid_layered_product_formats": [], "volume_id_substitutions": {}, + "restricted_volid": False, } variant = mock.Mock(uid="Server", type="variant") c = compose.Compose(conf, self.tmp_dir) - with self.assertRaises(ValueError) as ctx: - util.get_volid(c, "x86_64", variant, disc_type=False) + volid = util.get_volid(c, "x86_64", variant, disc_type=False) + self.assertEqual(len(volid), 32) + pass - self.assertIn("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", str(ctx.exception)) - self.assertIn("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", str(ctx.exception)) @mock.patch("pungi.compose.ComposeInfo") def test_apply_substitutions(self, ci):