Python 3.14: fix assertRaises

Python 3.14 tightened call semantics, and testtools 2.8.2 no longer
tolerates unittest-style kwargs, when Nova tests were mixing
testtools.TestCase with unittest. This patch fixes this by using
positional arguments for assertRaises.

Signed-off-by: Thomas Goirand <zigo@debian.org>
Change-Id: Ic589880d4759336ab6ceec5057eafe223f692caa
This commit is contained in:
Thomas Goirand
2025-12-29 11:31:43 +01:00
parent 4b71dab239
commit 21b365b140

View File

@@ -264,9 +264,9 @@ class QuobyteTestCase(test.NoDBTestCase):
stat_mock.side_effect = [os.stat, statMockCall]
self.assertRaises(
excClass=nova_exception.InvalidVolume,
callableObj=drv.validate_volume,
mount_path=self.TEST_MNT_POINT)
nova_exception.InvalidVolume,
drv.validate_volume,
self.TEST_MNT_POINT)
stat_mock.assert_called_with(self.TEST_MNT_POINT)
part_mock.assert_called_once_with(all=True)