add tests for url query list value

This commit is contained in:
Roi Shacham
2024-01-11 16:36:53 +00:00
parent 772b03050f
commit 8f96b602d1
4 changed files with 20 additions and 1 deletions

View File

@@ -224,7 +224,12 @@ class TestManual(unittest.TestCase):
client = openapi_client.ApiClient()
params = client.parameters_to_url_query([("boolean", True),], {})
self.assertEqual(params, "boolean=true")
def test_parameters_to_url_query_list_value(self):
client = openapi_client.ApiClient()
params = client.parameters_to_url_query(params=[('list', [1, 2, 3])], collection_formats={'list': 'multi'})
self.assertEqual(params, "list=1&list=2&list=3")
def echoServerResponseParaserTest(self):
s = """POST /echo/body/Pet/response_string HTTP/1.1
Host: localhost:3000