File: test_api.py

package info (click to toggle)
python-rfc3986 2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 500 kB
  • sloc: python: 2,899; makefile: 18
file content (16 lines) | stat: -rw-r--r-- 431 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from rfc3986.api import is_valid_uri
from rfc3986.api import normalize_uri
from rfc3986.api import uri_reference
from rfc3986.api import URIReference


def test_uri_reference():
    assert isinstance(uri_reference("http://example.com"), URIReference)


def test_is_valid_uri():
    assert is_valid_uri("http://example.com") is True


def test_normalize_uri():
    assert normalize_uri("HTTP://EXAMPLE.COM") == "http://example.com"