We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e49ad70 commit fae9bd7Copy full SHA for fae9bd7
1 file changed
gapic/ads-templates/tests/unit/gapic/%name_%version/%sub/_test_mixins.py.j2
@@ -30,7 +30,11 @@ def test_{{ name|snake_case }}_rest(request_type):
30
transport="rest",
31
)
32
request_init = {{ api.mixin_http_options["{}".format(name)][0].sample_request }}
33
- request = request_type(**request_init)
+ if request_type is dict:
34
+ request = dict(request_init)
35
+ else:
36
+ # Native protobuf requires keyword arguments (**).
37
+ request = request_type(**request_init)
38
# Mock the http request call within the method and fake a response.
39
with mock.patch.object(type(client.transport._session), 'request') as req:
40
# Designate an appropriate value for the returned response.
0 commit comments