Browse Source

APIKey scheme name default changed

pull/4791/head
bilalAlpaslan 3 years ago
parent
commit
2a48bb23c7
  1. 4
      tests/test_security_api_key_cookie.py
  2. 4
      tests/test_security_api_key_cookie_optional.py
  3. 4
      tests/test_security_api_key_header.py
  4. 4
      tests/test_security_api_key_header_optional.py
  5. 8
      tests/test_security_api_key_multiple_header.py
  6. 4
      tests/test_security_api_key_query.py
  7. 4
      tests/test_security_api_key_query_optional.py
  8. 2
      tests/test_tutorial/test_request_files/test_tutorial001.py

4
tests/test_security_api_key_cookie.py

@ -43,9 +43,7 @@ openapi_schema = {
}
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "cookie"}
}
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "cookie"}}
},
}

4
tests/test_security_api_key_cookie_optional.py

@ -50,9 +50,7 @@ openapi_schema = {
}
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "cookie"}
}
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "cookie"}}
},
}

4
tests/test_security_api_key_header.py

@ -43,9 +43,7 @@ openapi_schema = {
}
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "header"}
}
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "header"}}
},
}

4
tests/test_security_api_key_header_optional.py

@ -49,9 +49,7 @@ openapi_schema = {
}
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "header"}
}
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "header"}}
},
}

8
tests/test_security_api_key_multiple_header.py

@ -29,7 +29,9 @@ def read_current_user(current_user: User = Depends(get_current_user)):
@app.get("/another_key/users/me")
def read_current_user_another_key(current_user: User = Depends(get_current_user_with_another_key)):
def read_current_user_another_key(
current_user: User = Depends(get_current_user_with_another_key),
):
return current_user
@ -64,12 +66,12 @@ openapi_schema = {
"operationId": "read_current_user_another_key_another_key_users_me_get",
"security": [{"another_key": []}],
}
}
},
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "header"},
"another_key": {"type": "apiKey", "name": "another_key", "in": "header"}
"another_key": {"type": "apiKey", "name": "another_key", "in": "header"},
}
},
}

4
tests/test_security_api_key_query.py

@ -43,9 +43,7 @@ openapi_schema = {
}
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "query"}
}
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "query"}}
},
}

4
tests/test_security_api_key_query_optional.py

@ -49,9 +49,7 @@ openapi_schema = {
}
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "query"}
}
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "query"}}
},
}

2
tests/test_tutorial/test_request_files/test_tutorial001.py

@ -162,7 +162,7 @@ def test_post_file(tmp_path):
def test_post_large_file(tmp_path):
default_pydantic_max_size = 2 ** 16
default_pydantic_max_size = 2**16
path = tmp_path / "test.txt"
path.write_bytes(b"x" * (default_pydantic_max_size + 1))

Loading…
Cancel
Save