add tests for #16199 (python client) (#16220)

This commit is contained in:
William Cheng 2023-07-30 01:19:11 +08:00 committed by GitHub
parent 48ff57b4f6
commit 526ca78e79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -508,3 +508,8 @@ class ModelTests(unittest.TestCase):
# should not throw the following errors:
# pydantic.errors.ConfigError: field "additional_properties" not yet prepared so type is still a ForwardRef, you might need to call ObjectToTestAdditionalProperties.update_forward_refs().
def test_first_ref(self):
# shouldn't throw "still a ForwardRef" error
a = petstore_api.FirstRef.from_dict({})
self.assertEqual(a.to_json(), "{}")