How to use the rfc3986.parseresult.ParseResult.from_string function in rfc3986

To help you get started, we’ve selected a few rfc3986 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github python-hyper / rfc3986 / tests / test_parseresult.py View on Github external
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"
github python-hyper / rfc3986 / tests / test_parseresult.py View on Github external
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