Add tests for #16217 (#16221)

* add tests for #16217

* add new files
This commit is contained in:
William Cheng
2023-07-31 11:03:36 +08:00
committed by GitHub
parent 77311c3d76
commit 3278eea9a4
28 changed files with 1044 additions and 0 deletions

View File

@@ -513,3 +513,10 @@ class ModelTests(unittest.TestCase):
a = petstore_api.FirstRef.from_dict({})
self.assertEqual(a.to_json(), "{}")
def test_allof(self):
# for issue 16104
model = petstore_api.Tiger.from_json('{"skill": "none", "type": "tiger", "info": {"name": "creature info"}}')
# shouldn't throw NameError
self.assertEqual(model.to_json(), '{"skill": "none", "type": "tiger", "info": {"name": "creature info"}}')