Skip to content

Commit

Permalink
fix: fix incorrectly referenced exceptions, add missing port to tests (
Browse files Browse the repository at this point in the history
…#873)

Fixes #872
  • Loading branch information
busunkim96 authored May 12, 2021
1 parent 29c201b commit 40078c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class {{ service.name }}Transport(metaclass=abc.ABCMeta):
{% if method.retry.backoff_multiplier %}multiplier={{ method.retry.backoff_multiplier }},{% endif %}
predicate=retries.if_exception_type(
{% for ex in method.retry.retryable_exceptions|sort(attribute='__name__') %}
exceptions.{{ ex.__name__ }},
core_exceptions.{{ ex.__name__ }},
{% endfor %}
),
deadline={{ method.timeout }},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class {{ service.async_client_name }}:
{% if method.retry.backoff_multiplier %}multiplier={{ method.retry.backoff_multiplier }},{% endif %}
predicate=retries.if_exception_type(
{% for ex in method.retry.retryable_exceptions|sort(attribute="__name__") %}
exceptions.{{ ex.__name__ }},
core_exceptions.{{ ex.__name__ }},
{% endfor %}
),
deadline={{ method.timeout }},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1665,7 +1665,7 @@ def test_{{ service.name|snake_case }}_transport_create_channel_old_api_core(tra

{% with host = (service.host|default('localhost', true)) %}
create_channel.assert_called_with(
"{{ host }}",
"{{ host }}{% if ":" not in service.host %}:443{% endif %}",
credentials=creds,
credentials_file=None,
quota_project_id="octopus",
Expand Down Expand Up @@ -1703,7 +1703,7 @@ def test_{{ service.name|snake_case }}_transport_create_channel_user_scopes(tran
transport_class(quota_project_id="octopus", scopes=["1", "2"])

create_channel.assert_called_with(
"{{ host }}",
"{{ host }}{% if ":" not in service.host %}:443{% endif %}",
credentials=creds,
credentials_file=None,
quota_project_id="octopus",
Expand Down

0 comments on commit 40078c4

Please sign in to comment.