forked from loafle/openapi-generator-original
[Python] Add echo_api test object serialization for multipart requests (#18176)
* [python] echo add test object serialization for multipart requests * [echo api] update samples * [echo api] update samples
This commit is contained in:
@@ -265,6 +265,19 @@ User-Agent: OpenAPI-Generator/1.0.0/python
|
||||
self.assertEqual(e.headers["Accept"], 'text/plain')
|
||||
self.assertEqual(e.method, 'POST')
|
||||
|
||||
def test_form_object_multipart(self):
|
||||
api_instance = openapi_client.FormApi()
|
||||
marker = openapi_client.TestFormObjectMultipartRequestMarker(
|
||||
name="name",
|
||||
)
|
||||
api_response = api_instance.test_form_object_multipart(
|
||||
marker=marker,
|
||||
)
|
||||
e = EchoServerResponseParser(api_response)
|
||||
self.assertEqual(e.path, "/form/object/multipart")
|
||||
self.assertTrue(e.headers["Content-Type"].startswith("multipart/form-data"))
|
||||
self.assertTrue("boundary=" in e.headers["Content-Type"])
|
||||
|
||||
class EchoServerResponseParser():
|
||||
def __init__(self, http_response):
|
||||
if http_response is None:
|
||||
|
||||
Reference in New Issue
Block a user