Skip to content

Commit

Permalink
Update call to assertDictContainsSubset() (#19122)
Browse files Browse the repository at this point in the history
`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/
  • Loading branch information
Ichimonji10 authored Jul 13, 2024
1 parent 7b52da5 commit 722be84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/client/echo_api/python/tests/test_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def testHeaderParameters(self):
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()
Expand Down

0 comments on commit 722be84

Please sign in to comment.