From 722be84cace0f25a22cd9ac7f5d749a704dd182f Mon Sep 17 00:00:00 2001 From: Jeremy Audet Date: Sat, 13 Jul 2024 06:28:26 -0400 Subject: [PATCH] Update call to assertDictContainsSubset() (#19122) `TestCase.assertDictContainsSubset()` was deprecated in Python 3.2, which went EOL in 2016. Rewrite the assertion to target Python 3.8+. See: https://docs.python.org/3.2/library/unittest.html#unittest.TestCase.assertDictContainsSubset See: https://devguide.python.org/versions/ --- samples/client/echo_api/python/tests/test_manual.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/client/echo_api/python/tests/test_manual.py b/samples/client/echo_api/python/tests/test_manual.py index e3a3771832a..8572845b9ab 100644 --- a/samples/client/echo_api/python/tests/test_manual.py +++ b/samples/client/echo_api/python/tests/test_manual.py @@ -66,7 +66,7 @@ class TestManual(unittest.TestCase): enum_nonref_string_header="success", enum_ref_string_header="failure", ) - self.assertDictContainsSubset(expected_header, e.headers) + self.assertLessEqual(expected_header.items(), e.headers.items()) def testEnumQueryParameters(self): api_instance = openapi_client.QueryApi()