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/
This commit is contained in:
Jeremy Audet 2024-07-13 06:28:26 -04:00 committed by GitHub
parent 7b52da5d57
commit 722be84cac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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()