def test_parse_authority_form(): assert _parse_authority_form(b"foo:42") == (b"foo", 42) with raises(HttpSyntaxException): _parse_authority_form(b"foo") with raises(HttpSyntaxException): _parse_authority_form(b"foo:bar") with raises(HttpSyntaxException): _parse_authority_form(b"foo:99999999") with raises(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(HttpSyntaxException): _parse_authority_form(b"foo") with raises(HttpSyntaxException): _parse_authority_form(b"foo:bar") with raises(HttpSyntaxException): _parse_authority_form(b"foo:99999999") with raises(HttpSyntaxException): _parse_authority_form(b"f\x00oo:80")