@@ -795,14 +795,21 @@ def test_percent_encoding_unreserved_characters(tmpl, kwargs, expected_result):
795795 ("/v1/{name=**}" , [], {"name" : ".." }, r"Invalid value .* for name\." ),
796796 ],
797797)
798- def test_path_traversal_dots_validation_bare_double_star (tmpl , args , kwargs , expected_err_match ):
798+ def test_path_traversal_dots_validation_bare_double_star (
799+ tmpl , args , kwargs , expected_err_match
800+ ):
799801 with pytest .raises (ValueError , match = expected_err_match ):
800802 path_template .expand (tmpl , * args , ** kwargs )
801803
804+
802805@pytest .mark .parametrize (
803806 "template_str, expected_pattern, expected_wildcards" ,
804807 [
805- ("projects/{project}/locations/{location}" , "projects/([^/]+)/locations/([^/]+)" , ("*" , "*" )),
808+ (
809+ "projects/{project}/locations/{location}" ,
810+ "projects/([^/]+)/locations/([^/]+)" ,
811+ ("*" , "*" ),
812+ ),
806813 ("projects/{project=**}" , "projects/(.+)" , ("**" ,)),
807814 ("projects/{project=locations/*}" , "projects/locations/([^/]+)" , ("*" ,)),
808815 ("projects/*/locations/**" , "projects/([^/]+)/locations/(.+)" , ("*" , "**" )),
0 commit comments