yuseok89 commented on code in PR #74639:
URL: https://github.com/apache/airflow/pull/74639#discussion_r4306186616
##########
providers/http/tests/unit/http/hooks/test_http.py:
##########
@@ -614,9 +614,22 @@ def test_keep_alive_disabled(self):
[
pytest.param("https://example.org", "/v1/test",
"https://example.org/v1/test", id="both-set"),
pytest.param("", "http://foo/bar/v1/test",
"http://foo/bar/v1/test", id="only-endpoint"),
+ pytest.param("https://example.org/v1", "test",
"https://example.org/v1/test", id="no-slash"),
+ pytest.param("https://example.org/v1/", "test",
"https://example.org/v1/test", id="base-slash"),
+ pytest.param(
+ "https://example.org/v1/", "/test",
"https://example.org/v1/test", id="slash-on-both-sides"
+ ),
+ pytest.param(
+ "https://example.org/v1//", "//test",
"https://example.org/v1/test", id="repeated-slashes"
+ ),
+ pytest.param("https://example.org/v1/", "",
"https://example.org/v1/", id="only-base"),
+ pytest.param("https://example.org/v1/", None,
"https://example.org/v1/", id="endpoint-none"),
+ # A connection without a host leaves the authority empty, so the
base url is the
+ # scheme separator itself and must not be mistaken for a trailing
path slash.
+ pytest.param("https://", "/v1/test", "https:///v1/test",
id="scheme-only-base"),
Review Comment:
Is preserving `https:///v1/test` intentional even though it has no host and
is rejected by Requests?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]