Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 3b2918e

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

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)