Skip to content

Commit 4680a97

Browse files
authored
fix: fix rest unit test (#1074)
In some cases `hostname:port` format was expected.
1 parent 3e41673 commit 4680a97

File tree

1 file changed

+1
-1
lines changed
  • packages/gapic-generator/gapic/templates/tests/unit/gapic/%name_%version/%sub

1 file changed

+1
-1
lines changed

packages/gapic-generator/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ def test_{{ method.name|snake_case }}_rest_flattened(transport: str = 'rest'):
12931293
assert len(req.mock_calls) == 1
12941294
_, args, _ = req.mock_calls[0]
12951295
{% with uri = method.http_options[0].uri %}
1296-
assert path_template.validate("https://{{ service.host }}{{ uri }}", args[1])
1296+
assert path_template.validate("https://%s{{ uri }}" % client.transport._host, args[1])
12971297
{% endwith %}
12981298
{# TODO(kbandes) - reverse-transcode request args to check all request fields #}
12991299

0 commit comments

Comments
 (0)