@@ -441,10 +441,14 @@ def test_api_v3_permission_oidc_groups_match(client, permissions, mock_ldap, app
441441 "testcases" : ["testcase1*" ],
442442 }
443443 )
444- with patch .object (app .oidc , "current_token_identity" , {
445- "uid" : "testuser1" ,
446- "realm_access" : {"roles" : ["testgroup1" ]},
447- }):
444+ with patch .object (
445+ app .oidc ,
446+ "current_token_identity" ,
447+ {
448+ "uid" : "testuser1" ,
449+ "realm_access" : {"roles" : ["testgroup1" ]},
450+ },
451+ ):
448452 data = brew_build_request_data ()
449453 r = client .post ("/api/v3/results/brew-builds" , json = data )
450454 assert r .status_code == 201 , r .text
@@ -461,10 +465,14 @@ def test_api_v3_permission_oidc_groups_no_match_ldap_fallback(
461465 "testcases" : ["testcase1*" ],
462466 }
463467 )
464- with patch .object (app .oidc , "current_token_identity" , {
465- "uid" : "testuser1" ,
466- "realm_access" : {"roles" : ["other_group" ]},
467- }):
468+ with patch .object (
469+ app .oidc ,
470+ "current_token_identity" ,
471+ {
472+ "uid" : "testuser1" ,
473+ "realm_access" : {"roles" : ["other_group" ]},
474+ },
475+ ):
468476 data = brew_build_request_data ()
469477 r = client .post ("/api/v3/results/brew-builds" , json = data )
470478 assert r .status_code == 201 , r .text
@@ -483,10 +491,14 @@ def test_api_v3_permission_oidc_groups_no_match_ldap_denies(
483491 "testcases" : ["testcase1*" ],
484492 }
485493 )
486- with patch .object (app .oidc , "current_token_identity" , {
487- "uid" : "testuser1" ,
488- "realm_access" : {"roles" : ["other_group" ]},
489- }):
494+ with patch .object (
495+ app .oidc ,
496+ "current_token_identity" ,
497+ {
498+ "uid" : "testuser1" ,
499+ "realm_access" : {"roles" : ["other_group" ]},
500+ },
501+ ):
490502 mock_ldap .search_s .return_value = []
491503 data = brew_build_request_data ()
492504 r = client .post ("/api/v3/results/brew-builds" , json = data )
@@ -504,10 +516,14 @@ def test_api_v3_permission_oidc_groups_match_without_ldap(
504516 "testcases" : ["testcase1*" ],
505517 }
506518 )
507- with patch .object (app .oidc , "current_token_identity" , {
508- "uid" : "testuser1" ,
509- "realm_access" : {"roles" : ["testgroup1" ]},
510- }):
519+ with patch .object (
520+ app .oidc ,
521+ "current_token_identity" ,
522+ {
523+ "uid" : "testuser1" ,
524+ "realm_access" : {"roles" : ["testgroup1" ]},
525+ },
526+ ):
511527 data = brew_build_request_data ()
512528 with patch .dict (app .config , {"LDAP_HOST" : None , "LDAP_SEARCHES" : None }):
513529 r = client .post ("/api/v3/results/brew-builds" , json = data )
0 commit comments