| 641 | |
| 642 | |
| 643 | def 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 | |
| 663 | def test_url_copywith_security(): |