From c70a41210eda953ba99c81b364ed5529275b91b7 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 1 Mar 2023 17:17:08 +0800 Subject: [PATCH] python-nextgen: fix tests --- .../client/petstore/python-nextgen/tests/test_api_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/openapi3/client/petstore/python-nextgen/tests/test_api_client.py b/samples/openapi3/client/petstore/python-nextgen/tests/test_api_client.py index d4de69555cc..2a9bbc69510 100644 --- a/samples/openapi3/client/petstore/python-nextgen/tests/test_api_client.py +++ b/samples/openapi3/client/petstore/python-nextgen/tests/test_api_client.py @@ -220,7 +220,7 @@ class ApiClientTests(unittest.TestCase): "category2": "example2" } result = self.api_client.parameters_to_url_query([('value', dictionary)], {}) - self.assertEqual(result, data) + self.assertEqual(result, "value=%7B%22category%22%3A%20%22example%22%2C%20%22category2%22%3A%20%22example2%22%7D") data='value={"number": 1, "string": "str", "bool": true, "dict": {"number": 1, "string": "str", "bool": true}}' dictionary = { @@ -234,7 +234,7 @@ class ApiClientTests(unittest.TestCase): } } result = self.api_client.parameters_to_url_query([('value', dictionary)], {}) - self.assertEqual(result, data) + self.assertEqual(result, 'value=%7B%22number%22%3A%201%2C%20%22string%22%3A%20%22str%22%2C%20%22bool%22%3A%20true%2C%20%22dict%22%3A%20%7B%22number%22%3A%201%2C%20%22string%22%3A%20%22str%22%2C%20%22bool%22%3A%20true%7D%7D') data='value={"strValues": ["one", "two", "three"], "dictValues": [{"name": "value1", "age": 14}, {"name": "value2", "age": 12}]}' dictionary = { @@ -255,7 +255,7 @@ class ApiClientTests(unittest.TestCase): ] } result = self.api_client.parameters_to_url_query([('value', dictionary)], {}) - self.assertEqual(result, data) + self.assertEqual(result, 'value=%7B%22strValues%22%3A%20%5B%22one%22%2C%20%22two%22%2C%20%22three%22%5D%2C%20%22dictValues%22%3A%20%5B%7B%22name%22%3A%20%22value1%22%2C%20%22age%22%3A%2014%7D%2C%20%7B%22name%22%3A%20%22value2%22%2C%20%22age%22%3A%2012%7D%5D%7D')