File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
cases/artificial_specs/auth Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ openapi : 3.0.0
2+ info :
3+ title : ' basic, but not set in security section'
4+ version : 1.0.0
5+ servers :
6+ - url : ' https://pokeapi.co/'
7+ components :
8+ securitySchemes :
9+ basicAuth : # <-- arbitrary name for the security scheme
10+ type : http
11+ scheme : basic
12+ # security:
13+ # - basicAuth: [] # <-- use the same name here
14+ paths :
15+ /api/v2/pokemon/ :
16+ get :
17+ operationId : pokemon_list
18+ responses :
19+ ' 200 ' :
20+ description : OK
Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ def test_basic_auth() -> None:
3030 }
3131
3232
33+ def test_unused_auth () -> None :
34+ source_dict = get_dict_by_case ("artificial" , "auth/basic_auth_not_used.yml" )
35+ assert not source_dict ["client" ].get ("auth" )
36+
37+
3338def test_oauth_warning () -> None :
3439 source_dict = get_dict_by_case ("artificial" , "auth/oauth.yml" )
3540 assert not source_dict ["client" ].get ("auth" )
You can’t perform that action at this time.
0 commit comments