Skip to content
Myr

Add test for origin from URL string (#312)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Yeray Diaz Diaz · committed by Florimond Manca · parent b8c5e7a · Browse files · 1 file+9 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−1 removed

  • tests:+9 added−1 removed

1 file+9 added−1 removed

modified:tests/models/test_url.py+9 added-1 removed
1import pytest23from httpx import URL3from httpx import URL, Origin4from httpx.exceptions import InvalidURL567@pytest.mark.parametrize(
166 unmodified lines
174175 url_set = set(urls)176177 assert all(url in urls for url in url_set)178179180def test_origin_from_url_string():181 origin = Origin("https://example.com")182 assert origin.scheme == "https"183 assert origin.is_ssl184 assert origin.host == "example.com"185 assert origin.port == 443