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