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

Function test_url_copywith_raw_path

tests/models/test_url.py:643–660  ·  tests/models/test_url.py::test_url_copywith_raw_path
()

Source from the content-addressed store, hash-verified

641
642
643def test_url_copywith_raw_path():
644 url = httpx.URL(class="st">"https://example.org")
645 url = url.copy_with(raw_path=bclass="st">"/some/path")
646 assert url.path == class="st">"/some/path"
647 assert url.query == bclass="st">""
648 assert url.raw_path == bclass="st">"/some/path"
649
650 url = httpx.URL(class="st">"https://example.org")
651 url = url.copy_with(raw_path=bclass="st">"/some/path?")
652 assert url.path == class="st">"/some/path"
653 assert url.query == bclass="st">""
654 assert url.raw_path == bclass="st">"/some/path?"
655
656 url = httpx.URL(class="st">"https://example.org")
657 url = url.copy_with(raw_path=bclass="st">"/some/path?a=123")
658 assert url.path == class="st">"/some/path"
659 assert url.query == bclass="st">"a=123"
660 assert url.raw_path == bclass="st">"/some/path?a=123"
661
662
663def test_url_copywith_security():

Callers

nothing calls this directly

Calls 1

copy_withMethod · 0.95

Tested by

no test coverage detected