From 84aaec3212da6ce249ec64ab8f4f3da96bf62a97 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 30 Jul 2023 00:50:01 +0800 Subject: [PATCH] add tests for #16199 (python client) --- samples/openapi3/client/petstore/python/tests/test_model.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/samples/openapi3/client/petstore/python/tests/test_model.py b/samples/openapi3/client/petstore/python/tests/test_model.py index 2598b0757d04..7cbe124bfc46 100644 --- a/samples/openapi3/client/petstore/python/tests/test_model.py +++ b/samples/openapi3/client/petstore/python/tests/test_model.py @@ -508,3 +508,8 @@ def test_object_with_additional_properties(self): # 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(), "{}") +