| 604 | |
| 605 | |
| 606 | def test_url_copywith_userinfo_subcomponents(): |
| 607 | copy_with_kwargs = { |
| 608 | class="st">"username": class="st">"tom@example.org", |
| 609 | class="st">"password": class="st">"abc123@ %", |
| 610 | } |
| 611 | url = httpx.URL(class="st">"https://example.org") |
| 612 | new = url.copy_with(**copy_with_kwargs) |
| 613 | assert str(new) == class="st">"https://tom%40example.org:abc123%40%20%@example.org" |
| 614 | assert new.username == class="st">"tom@example.org" |
| 615 | assert new.password == class="st">"abc123@ %" |
| 616 | assert new.userinfo == bclass="st">"tom%40example.org:abc123%40%20%" |
| 617 | |
| 618 | |
| 619 | def test_url_copywith_invalid_component(): |