@@ -197,7 +197,7 @@ def test_access_policies_update(self):
197197
198198 access_policy = self .arch .access_policies .update (
199199 IDENTITY ,
200- PROPS ,
200+ props = PROPS ,
201201 )
202202 args , kwargs = mock_patch .call_args
203203 self .assertEqual (
@@ -382,46 +382,6 @@ def test_access_policies_list_by_name(self):
382382 msg = "GET method called incorrectly" ,
383383 )
384384
385- def test_access_policies_count_matching_access_policies (self ):
386- """
387- Test access_policy counting
388- """
389- with mock .patch .object (self .arch .session , "get" ) as mock_get :
390- mock_get .return_value = MockResponse (
391- 200 ,
392- headers = {HEADERS_TOTAL_COUNT : 1 },
393- access_policies = [
394- RESPONSE ,
395- ],
396- )
397-
398- count = self .arch .access_policies .count_matching_access_policies (ASSET_ID )
399- self .assertEqual (
400- tuple (mock_get .call_args ),
401- (
402- (
403- (
404- f"url/{ ROOT } /"
405- f"{ ACCESS_POLICIES_SUBPATH } /{ ASSET_ID } /{ ACCESS_POLICIES_LABEL } "
406- ),
407- ),
408- {
409- "headers" : {
410- "authorization" : "Bearer authauthauth" ,
411- HEADERS_REQUEST_TOTAL_COUNT : "true" ,
412- },
413- "params" : {"page_size" : 1 },
414- "verify" : True ,
415- },
416- ),
417- msg = "GET method called incorrectly" ,
418- )
419- self .assertEqual (
420- count ,
421- 1 ,
422- msg = "Incorrect count" ,
423- )
424-
425385 def test_access_policies_list_matching_access_policies (self ):
426386 """
427387 Test access_policy counting
@@ -468,45 +428,6 @@ def test_access_policies_list_matching_access_policies(self):
468428 msg = "GET method called incorrectly" ,
469429 )
470430
471- def test_access_policies_count_matching_assets (self ):
472- """
473- Test access_policy counting
474- """
475- with mock .patch .object (self .arch .session , "get" ) as mock_get :
476- mock_get .return_value = MockResponse (
477- 200 ,
478- headers = {HEADERS_TOTAL_COUNT : 1 },
479- assets = [
480- ASSET ,
481- ],
482- )
483-
484- count = self .arch .access_policies .count_matching_assets (IDENTITY )
485- self .assertEqual (
486- tuple (mock_get .call_args ),
487- (
488- (
489- (
490- f"url/{ ROOT } /{ ACCESS_POLICIES_SUBPATH } /{ IDENTITY } /{ ASSETS_LABEL } "
491- ),
492- ),
493- {
494- "headers" : {
495- "authorization" : "Bearer authauthauth" ,
496- HEADERS_REQUEST_TOTAL_COUNT : "true" ,
497- },
498- "params" : {"page_size" : 1 },
499- "verify" : True ,
500- },
501- ),
502- msg = "GET method called incorrectly" ,
503- )
504- self .assertEqual (
505- count ,
506- 1 ,
507- msg = "Incorrect count" ,
508- )
509-
510431 def test_access_policies_list_matching_assets (self ):
511432 """
512433 Test access_policy counting
0 commit comments