Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_normalizes_uris_when_using_from_string(uri_to_normalize):
"""Verify we always get the same thing out as we expect."""
result = pr.ParseResult.from_string(
uri_to_normalize, lazy_normalize=False
)
assert result.scheme == "https"
assert result.host == "example.com"
def test_creates_a_copy_with_a_new_port(basic_uri):
uri = pr.ParseResult.from_string(basic_uri)
new_uri = uri.copy_with(port=443)
assert new_uri.port == 443