MCPcopy
hub / github.com/encode/httpx / test_url_join

Function test_url_join

tests/models/test_url.py:479–491  ·  view source on GitHub ↗

Some basic URL joining tests.

()

Source from the content-addressed store, hash-verified

477
478
479def test_url_join():
480 """
481 Some basic URL joining tests.
482 """
483 url = httpx.URL("https://example.org:123/path/to/somewhere")
484 assert url.join("/somewhere-else") == "https://example.org:123/somewhere-else"
485 assert (
486 url.join("somewhere-else") == "https://example.org:123/path/to/somewhere-else"
487 )
488 assert (
489 url.join("../somewhere-else") == "https://example.org:123/path/somewhere-else"
490 )
491 assert url.join("../../somewhere-else") == "https://example.org:123/somewhere-else"
492
493
494def test_relative_url_join():

Callers

nothing calls this directly

Calls 1

joinMethod · 0.95

Tested by

no test coverage detected