Skip to content

Commit

Permalink
fix: use list of tuples
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 committed Dec 10, 2020
1 parent 6785b3d commit fbd4d44
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ class {{ service.name }}GrpcTransport({{ service.name }}Transport):
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options={
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
},
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -142,10 +142,10 @@ class {{ service.name }}GrpcTransport({{ service.name }}Transport):
credentials=credentials,
ssl_credentials=ssl_channel_credentials,
scopes=self.AUTH_SCOPES,
options={
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
},
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

self._stubs = {} # type: Dict[str, Callable]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,10 +748,10 @@ def test_{{ service.name|snake_case }}_transport_channel_mtls_with_client_cert_s
),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options={
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
},
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel
assert transport._ssl_channel_credentials == mock_ssl_cred
Expand Down Expand Up @@ -791,10 +791,10 @@ def test_{{ service.name|snake_case }}_transport_channel_mtls_with_adc(
),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options={
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
},
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ class {{ service.name }}GrpcTransport({{ service.name }}Transport):
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options={
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
},
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -152,10 +152,10 @@ class {{ service.name }}GrpcTransport({{ service.name }}Transport):
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options={
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
},
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

self._stubs = {} # type: Dict[str, Callable]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options={
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
},
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -196,10 +196,10 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options={
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
},
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

# Run the base constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ class {{ service.name }}RestTransport({{ service.name }}Transport):
self._host,
credentials=self._credentials,
scopes=self.AUTH_SCOPES,
options={
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
},
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1237,10 +1237,10 @@ def test_{{ service.name|snake_case }}_transport_channel_mtls_with_client_cert_s
),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options={
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
},
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel
assert transport._ssl_channel_credentials == mock_ssl_cred
Expand Down Expand Up @@ -1280,10 +1280,10 @@ def test_{{ service.name|snake_case }}_transport_channel_mtls_with_adc(
),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options={
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
},
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel

Expand Down

0 comments on commit fbd4d44

Please sign in to comment.