@@ -21,7 +21,7 @@ def resp_list_protected_registries():
2121    with  responses .RequestsMock () as  rsps :
2222        rsps .add (
2323            method = responses .GET ,
24-             url = "http://localhost/api/v4/projects/1/registry/repository/ protection/rules" ,
24+             url = "http://localhost/api/v4/projects/1/registry/protection/repository /rules" ,
2525            json = [protected_registry_content ],
2626            content_type = "application/json" ,
2727            status = 200 ,
@@ -34,7 +34,7 @@ def resp_create_protected_registry():
3434    with  responses .RequestsMock () as  rsps :
3535        rsps .add (
3636            method = responses .POST ,
37-             url = "http://localhost/api/v4/projects/1/registry/repository/ protection/rules" ,
37+             url = "http://localhost/api/v4/projects/1/registry/protection/repository /rules" ,
3838            json = protected_registry_content ,
3939            content_type = "application/json" ,
4040            status = 201 ,
@@ -50,7 +50,7 @@ def resp_update_protected_registry():
5050    with  responses .RequestsMock () as  rsps :
5151        rsps .add (
5252            method = responses .PATCH ,
53-             url = "http://localhost/api/v4/projects/1/registry/repository/ protection/rules/1" ,
53+             url = "http://localhost/api/v4/projects/1/registry/protection/repository /rules/1" ,
5454            json = updated_content ,
5555            content_type = "application/json" ,
5656            status = 200 ,
@@ -59,13 +59,13 @@ def resp_update_protected_registry():
5959
6060
6161def  test_list_project_protected_registries (project , resp_list_protected_registries ):
62-     protected_registry  =  project .registry_repository_protection_rules .list ()[0 ]
62+     protected_registry  =  project .registry_protection_repository_rules .list ()[0 ]
6363    assert  isinstance (protected_registry , ProjectRegistryRepositoryProtectionRule )
6464    assert  protected_registry .repository_path_pattern  ==  "test/image" 
6565
6666
6767def  test_create_project_protected_registry (project , resp_create_protected_registry ):
68-     protected_registry  =  project .registry_repository_protection_rules .create (
68+     protected_registry  =  project .registry_protection_repository_rules .create (
6969        {
7070            "repository_path_pattern" : "test/image" ,
7171            "minimum_access_level_for_push" : "maintainer" ,
@@ -76,7 +76,7 @@ def test_create_project_protected_registry(project, resp_create_protected_regist
7676
7777
7878def  test_update_project_protected_registry (project , resp_update_protected_registry ):
79-     updated  =  project .registry_repository_protection_rules .update (
79+     updated  =  project .registry_protection_repository_rules .update (
8080        1 , {"repository_path_pattern" : "abc*" }
8181    )
8282    assert  updated ["repository_path_pattern" ] ==  "abc*" 
0 commit comments