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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user