From 0ed3ba487e27dd5a7b97e417f7fc865141f12d18 Mon Sep 17 00:00:00 2001 From: Artur Zdolinski Date: Sun, 10 Mar 2024 22:29:52 +0000 Subject: [PATCH] restore sanitize test for serialization with different data types --- samples/openapi3/client/petstore/python/tests/test_model.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/openapi3/client/petstore/python/tests/test_model.py b/samples/openapi3/client/petstore/python/tests/test_model.py index d24d6d17a69a..1d3c29e2f4a1 100644 --- a/samples/openapi3/client/petstore/python/tests/test_model.py +++ b/samples/openapi3/client/petstore/python/tests/test_model.py @@ -407,7 +407,10 @@ def test_valdiator(self): a.pattern_with_digits_and_delimiter = "image_123" self.assertEqual(a.pattern_with_digits_and_delimiter, "image_123") - # test sanitize for serializaation with SecretStr (format: password) + # test sanitize for serialization with different data types + self.assertEquals(petstore_api.ApiClient().sanitize_for_serialization(a), {'byte': b'string', 'date': '2013-09-17', 'number': 123.45, 'password': 'testing09876', 'pattern_with_digits_and_delimiter': 'image_123'}) + + # test sanitize for serialization with SecretStr (format: password) class LoginTest(BaseModel): username: StrictStr = Field(min_length=2, strict=True, max_length=64) password: SecretStr