def test_invalid_http_version_list_type(): with pytest.raises(ValueError): httpx.HTTPVersionConfig([123])
def test_empty_http_version(): with pytest.raises(ValueError): httpx.HTTPVersionConfig([])
def test_invalid_http_version_type(): with pytest.raises(TypeError): httpx.HTTPVersionConfig(123)
def test_invalid_http_version(): with pytest.raises(ValueError): httpx.HTTPVersionConfig("HTTP/9")
def test_http_versions_from_config(): http_versions = httpx.HTTPVersionConfig( httpx.HTTPVersionConfig("HTTP/1.1")) assert repr(http_versions) == "HTTPVersionConfig(['HTTP/1.1'])"
def test_http_versions_from_list(): http_versions = httpx.HTTPVersionConfig(["http/1.1"]) assert repr(http_versions) == "HTTPVersionConfig(['HTTP/1.1'])"
def test_http_versions_repr(): http_versions = httpx.HTTPVersionConfig() assert repr(http_versions) == "HTTPVersionConfig(['HTTP/1.1', 'HTTP/2'])"