@@ -15,20 +15,20 @@ class TestPermissionDelete:
1515 @responses .activate
1616 def test (self ):
1717 # data
18- id = "94"
18+ uid = "94"
1919 content_guid = "f2f37341-e21d-3d80-c698-a935ad614066"
2020
2121 # behavior
2222 mock_delete = responses .delete (
23- f"https://connect.example/__api__/v1/content/{ content_guid } /permissions/{ id } "
23+ f"https://connect.example/__api__/v1/content/{ content_guid } /permissions/{ uid } "
2424 )
2525
2626 # setup
2727 params = ResourceParameters (
2828 requests .Session (), Url ("https://connect.example/__api__" )
2929 )
3030 fake_permission = load_mock (
31- f"v1/content/{ content_guid } /permissions/{ id } .json"
31+ f"v1/content/{ content_guid } /permissions/{ uid } .json"
3232 )
3333 permission = Permission (params , ** fake_permission )
3434
@@ -43,7 +43,7 @@ class TestPermissionUpdate:
4343 @responses .activate
4444 def test_request_shape (self ):
4545 # test data
46- id = random .randint (0 , 100 )
46+ uid = random .randint (0 , 100 )
4747 content_guid = str (uuid .uuid4 ())
4848 principal_guid = str (uuid .uuid4 ())
4949 principal_type = "principal_type"
@@ -52,7 +52,7 @@ def test_request_shape(self):
5252
5353 # define api behavior
5454 responses .put (
55- f"https://connect.example/__api__/v1/content/{ content_guid } /permissions/{ id } " ,
55+ f"https://connect.example/__api__/v1/content/{ content_guid } /permissions/{ uid } " ,
5656 json = {
5757 # doesn't matter for this test
5858 },
@@ -77,7 +77,7 @@ def test_request_shape(self):
7777 )
7878 permission = Permission (
7979 params ,
80- id = id ,
80+ id = uid ,
8181 content_guid = content_guid ,
8282 principal_guid = principal_guid ,
8383 principal_type = principal_type ,
@@ -94,18 +94,18 @@ def test_role_update(self):
9494 old_role = "owner"
9595 new_role = "viewer"
9696
97- id = "94"
97+ uid = "94"
9898 content_guid = "f2f37341-e21d-3d80-c698-a935ad614066"
9999 fake_permission = load_mock (
100- f"v1/content/{ content_guid } /permissions/{ id } .json"
100+ f"v1/content/{ content_guid } /permissions/{ uid } .json"
101101 )
102102 fake_permission .update (role = new_role )
103103
104104 # define api behavior
105- id = random .randint (0 , 100 )
105+ uid = random .randint (0 , 100 )
106106 content_guid = str (uuid .uuid4 ())
107107 responses .put (
108- f"https://connect.example/__api__/v1/content/{ content_guid } /permissions/{ id } " ,
108+ f"https://connect.example/__api__/v1/content/{ content_guid } /permissions/{ uid } " ,
109109 json = fake_permission ,
110110 match = [
111111 matchers .json_params_matcher (
@@ -123,7 +123,7 @@ def test_role_update(self):
123123 requests .Session (), Url ("https://connect.example/__api__" )
124124 )
125125 permission = Permission (
126- params , id = id , content_guid = content_guid , role = old_role
126+ params , id = uid , content_guid = content_guid , role = old_role
127127 )
128128
129129 # assert role change with respect to api response
@@ -164,13 +164,13 @@ class TestPermissionsCreate:
164164 @responses .activate
165165 def test (self ):
166166 # data
167- id = "94"
167+ uid = "94"
168168 content_guid = "f2f37341-e21d-3d80-c698-a935ad614066"
169169 principal_guid = str (uuid .uuid4 ())
170170 principal_type = "user"
171171 role = "owner"
172172 fake_permission = {
173- ** load_mock (f"v1/content/{ content_guid } /permissions/{ id } .json" ),
173+ ** load_mock (f"v1/content/{ content_guid } /permissions/{ uid } .json" ),
174174 "principal_guid" : principal_guid ,
175175 "principal_type" : principal_type ,
176176 "role" : role ,
@@ -268,15 +268,15 @@ class TestPermissionsGet:
268268 @responses .activate
269269 def test (self ):
270270 # data
271- id = "94"
271+ uid = "94"
272272 content_guid = "f2f37341-e21d-3d80-c698-a935ad614066"
273273 fake_permission = load_mock (
274- f"v1/content/{ content_guid } /permissions/{ id } .json"
274+ f"v1/content/{ content_guid } /permissions/{ uid } .json"
275275 )
276276
277277 # behavior
278278 responses .get (
279- f"https://connect.example/__api__/v1/content/{ content_guid } /permissions/{ id } " ,
279+ f"https://connect.example/__api__/v1/content/{ content_guid } /permissions/{ uid } " ,
280280 json = fake_permission ,
281281 )
282282
@@ -287,7 +287,7 @@ def test(self):
287287 permissions = Permissions (params , content_guid = content_guid )
288288
289289 # invoke
290- permission = permissions .get (id )
290+ permission = permissions .get (uid )
291291
292292 # assert
293293 assert permission == fake_permission
0 commit comments