- Unittests are fixed

This commit is contained in:
Stepan Oksanichenko 2024-09-08 12:01:32 +03:00
parent d8b7f9210e
commit 38cc2f79a0
Signed by: soksanichenko
GPG Key ID: AB9983172AB1E45B

View File

@ -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):