Author: James Page <james.page@canonical.com>
Date: Wed, 24 Jan 2024 13:47:03 +0000
Subject: python 3.12: assertDictContainsSubset
 Python 3.12 drops the long deprecated assertDictContainsSubset method
 in unittest; as this test class makes extensive use of this assertion,
 provide as part of the test class using unions to validate the
 assertion.
Change-Id: Idc156f85b769329c4a3bc443c404ec7ecf930360
Origin: upstream, https://review.opendev.org/c/openstack/networking-sfc/+/906523
Last-Update: 2023-03-13

Index: networking-sfc/networking_sfc/tests/unit/services/sfc/drivers/ovs/test_driver.py
===================================================================
--- networking-sfc.orig/networking_sfc/tests/unit/services/sfc/drivers/ovs/test_driver.py
+++ networking-sfc/networking_sfc/tests/unit/services/sfc/drivers/ovs/test_driver.py
@@ -93,6 +93,10 @@ class OVSSfcDriverTestCase(
         """Check whether dict a is a subset of dict b."""
         self.assertEqual(b, {**b, **a})
 
+    def assertDictContainsSubset(self, a, b):
+        """Check whether dict a is a subset of dict b."""
+        self.assertEqual(b, {**b, **a})
+
     def setUp(self):
         sfc_plugin = test_sfc_db.DB_SFC_PLUGIN_CLASS
         flowclassifier_plugin = (
