You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5282533
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/services/%service/_shared_macros.j2
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -402,7 +402,7 @@ class {{ async_method_name_prefix }}{{ service.name }}RestInterceptor:
Copy file name to clipboardExpand all lines: packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/grpc_asyncio.py.j2
+23-21Lines changed: 23 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -375,30 +375,32 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
Copy file name to clipboardExpand all lines: packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -277,12 +277,10 @@ class {{service.name}}RestTransport(_Base{{ service.name }}RestTransport):
277
277
278
278
uri = transcoded_request["uri"]
279
279
upload_url = f"{self._host}{uri}"
280
-
headers = dict(metadata)
280
+
headers = {**dict(metadata), **dict((config.headers or {}) if config else {})}
Copy file name to clipboardExpand all lines: packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest_asyncio.py.j2
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -236,12 +236,10 @@ class Async{{service.name}}RestTransport(_Base{{ service.name }}RestTransport):
236
236
237
237
uri = transcoded_request["uri"]
238
238
upload_url = f"{self._host}{uri}"
239
-
headers = dict(metadata)
239
+
headers = {**dict(metadata), **dict((config.headers or {}) if config else {})}
# Mock the http request call within the method and fake a BadRequest error.
1840
-
with mock.patch.object({{mocked_session}}, 'request') as req, pytest.raises(core_exceptions.BadRequest):
1846
+
with mock.patch.object({{mocked_session}}, 'request'{%ifis_asyncandmethod.is_resumable_upload%}, new_callable=mock.MagicMock{%endif%}) as req, pytest.raises(core_exceptions.BadRequest):
0 commit comments