Skip to content

Commit

Permalink
fix: fix rest transport unit test template
Browse files Browse the repository at this point in the history
  • Loading branch information
arithmetic1728 committed Jan 20, 2021
1 parent e5cb1d1 commit 92b755f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ def test_{{ method.name|snake_case }}_rest(transport: str = 'rest', request_type
# Wrap the value into a proper Response obj
json_return_value = {{ method.output.ident }}.to_json(return_value)
response_value = Response()
response_value.status_code = 200
response_value._content = json_return_value.encode('UTF-8')
req.return_value = response_value
{% if method.client_streaming %}
Expand Down Expand Up @@ -1111,6 +1112,7 @@ def test_{{ method.name|snake_case }}_rest_flattened():
# Wrap the value into a proper Response obj
json_return_value = {{ method.output.ident }}.to_json(return_value)
response_value = Response()
response_value.status_code = 200
response_value._content = json_return_value.encode('UTF-8')
req.return_value = response_value

Expand Down

0 comments on commit 92b755f

Please sign in to comment.