def test_parse_authority_form(): assert _parse_authority_form(b"foo:42") == (b"foo", 42) assert _parse_authority_form(b"[2001:db8:42::]:443") == (b"2001:db8:42::", 443) with pytest.raises(exceptions.HttpSyntaxException): _parse_authority_form(b"foo") with pytest.raises(exceptions.HttpSyntaxException): _parse_authority_form(b"foo:bar") with pytest.raises(exceptions.HttpSyntaxException): _parse_authority_form(b"foo:99999999") with pytest.raises(exceptions.HttpSyntaxException): _parse_authority_form(b"f\x00oo:80")
def test_parse_authority_form(): assert _parse_authority_form(b"foo:42") == (b"foo", 42) assert _parse_authority_form(b"[2001:db8:42::]:443") == (b"2001:db8:42::", 443) with pytest.raises(exceptions.HttpSyntaxException): _parse_authority_form(b"foo") with pytest.raises(exceptions.HttpSyntaxException): _parse_authority_form(b"foo:bar") with pytest.raises(exceptions.HttpSyntaxException): _parse_authority_form(b"foo:99999999") with pytest.raises(exceptions.HttpSyntaxException): _parse_authority_form(b"f\x00oo:80")
def test_parse_authority_form(): assert _parse_authority_form(b"foo:42") == (b"foo", 42) with raises(exceptions.HttpSyntaxException): _parse_authority_form(b"foo") with raises(exceptions.HttpSyntaxException): _parse_authority_form(b"foo:bar") with raises(exceptions.HttpSyntaxException): _parse_authority_form(b"foo:99999999") with raises(exceptions.HttpSyntaxException): _parse_authority_form(b"f\x00oo:80")
def test_parse_authority_form(): assert _parse_authority_form(b"foo:42") == (b"foo", 42) with raises(exceptions.HttpSyntaxException): _parse_authority_form(b"foo") with raises(exceptions.HttpSyntaxException): _parse_authority_form(b"foo:bar") with raises(exceptions.HttpSyntaxException): _parse_authority_form(b"foo:99999999") with raises(exceptions.HttpSyntaxException): _parse_authority_form(b"f\x00oo:80")