Fix last use of assertDictContainsSubset

The method was deprecated in Python 3.2 [1]; and
no longer available in Python version 3.12 [2]

assertLessEqual [3] offers a decent alternative.
Much of this work was done in
I74276297d80cbd055a9347b0d595fe7c2d7742cc. One
last occurrence remained.

[1] https://docs.python.org/3/whatsnew/3.2.html#unittest
[2] https://docs.python.org/3/whatsnew/3.12.html#id3
[3] https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertLessEqual

Change-Id: I2f32f9815196a4d627ce22b382cdcb1f49027a52
Closes-Bug: #2085467
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This commit is contained in:
Goutham Pacha Ravi 2024-11-07 12:21:00 -08:00
parent 31df75e18b
commit f4b5557058

@ -175,7 +175,7 @@ class ShareNetworkSubnetsTest(base.BaseSharesMixedTest):
# Default subnet was created during share network creation
self.assertIsNone(default_subnet['availability_zone'])
# Match new subnet content
self.assertDictContainsSubset(data, subnet)
self.assertLessEqual(data.items(), subnet.items())
# Match share server subnet
if check_multiple_subnet:
self.assertIn(subnet['id'],