-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[python-experimental] Adds response body tests for json content type (#…
…12988) * Tags renamed * Spec updated to add response bodies * Adds correct tag to response body routes * Adds response body autogen tests * Adds pos test cases, removes dead code * Adds and uses api_test_partial * Samples regenerated
- Loading branch information
Showing
545 changed files
with
122,756 additions
and
37,045 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
modules/openapi-generator/src/main/resources/python-experimental/api_test_partial.handlebars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
api_response = self.api.{{operationId}}( | ||
{{#if bodyParam}} | ||
body=body, | ||
content_type=content_type | ||
{{/if}} | ||
{{#if produces}} | ||
accept_content_types=(accept_content_type,) | ||
{{/if}} | ||
) | ||
self.assert_pool_manager_request_called_with( | ||
mock_request, | ||
self._configuration.host + '{{{path}}}', | ||
method='{{httpMethod}}', | ||
{{#if bodyParam}} | ||
body=self.json_bytes(payload), | ||
content_type=content_type, | ||
{{/if}} | ||
{{#if produces}} | ||
accept_content_type=accept_content_type, | ||
{{/if}} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.