โ† baseline_full_v2

fastapi_14455

failed NO_PATCH NO_PATCH UNSUBMITTED empty_patch(None) ยท None tool calls ยท 0 s ยท fastapi/fastapi

Task input

๐Ÿ› Fix OpenAPI security scheme OAuth2 scopes declaration, deduplicate security schemes with different scopes

๐Ÿ› Fix OpenAPI security scheme OAuth2 scopes declaration, deduplicate security schemes with different scopes

This should fix https://github.com/fastapi/fastapi/issues/14454

Tool calls (0)

#ToolArgumentsResult
No trace captured.

Test output

show
                 },                                                      โ”‚
โ”‚                  },                                                          โ”‚
โ”‚              },                                                              โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
These changes are not applied.
Use --inline-snapshot=fix to apply them, or use the interactive mode with 
--inline-snapshot=review

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Problems โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
inline-snapshot is not able to format your code.
This issue can be solved by:
 * installing inline-snapshot[black] which gives you the same formatting like in
older versions
 * adding a `format-command` to your pyproject.toml (see 
https://15r10nk.github.io/inline-snapshot/latest/configuration/#format-command 
for more information).



==================================== ERRORS ====================================
___________________ ERROR at teardown of test_openapi_schema ___________________
some snapshots in this test have incorrect values.
If you just created this value with --inline-snapshot=create, the value is now created and you can ignore this message.
=================================== FAILURES ===================================
_____________________________ test_openapi_schema ______________________________

    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
>       assert response.json() == snapshot(
            {
                "openapi": "3.1.0",
                "info": {"title": "FastAPI", "version": "0.1.0"},
                "paths": {
                    "/": {
                        "get": {
                            "summary": "Root",
                            "operationId": "root__get",
                            "responses": {
                                "200": {
                                    "description": "Successful Response",
                                    "content": {"application/json": {"schema": {}}},
                                }
                            },
                            "security": [{"OAuth2AuthorizationCodeBearer": []}],
                        }
                    },
                    "/items/": {
                        "get": {
                            "summary": "Read Items",
                            "operationId": "read_items_items__get",
                            "responses": {
                                "200": {
                                    "description": "Successful Response",
                                    "content": {"application/json": {"schema": {}}},
                                }
                            },
                            "security": [
                                {"OAuth2AuthorizationCodeBearer": ["read"]},
                            ],
                        },
                        "post": {
                            "summary": "Create Item",
                            "operationId": "create_item_items__post",
                            "responses": {
                                "200": {
                                    "description": "Successful Response",
                                    "content": {"application/json": {"schema": {}}},
                                }
                            },
                            "security": [
                                {"OAuth2AuthorizationCodeBearer": ["read", "write"]},
                            ],
                        },
                    },
                },
                "components": {
                    "securitySchemes": {
                        "OAuth2AuthorizationCodeBearer": {
                            "type": "oauth2",
                            "flows": {
                                "authorizationCode": {
                                    "scopes": {
                                        "read": "Read access",
                                        "write": "Write access",
                                    },
                                    "authorizationUrl": "authorize",
                                    "tokenUrl": "token",
                                }
                            },
                        }
                    }
                },
            }
        )
E       AssertionError: assert {'openapi': '... 'token'}}}}}} == {'openapi': '... 'token'}}}}}}
E         
E         Omitting 3 identical items, use -vv to show
E         Differing items:
E         {'paths': {'/': {'get': {'summary': 'Root', 'operationId': 'root__get', 'responses': {'200': {'description': 'Successf...2AuthorizationCodeBearer': []}, {'OAuth2AuthorizationCodeBearer': [...]}, {'OAuth2AuthorizationCodeBearer': [...]}]}}}} != {'paths': {'/': {'get': {'summary': 'Root', 'operationId': 'root__get', 'responses': {'200': {'description': 'Successf...: {'description': 'Successful Response', 'content': {...}}}, 'security': [{'OAuth2AuthorizationCodeBearer': [...]}]}}}}
E         Use -v to get more diff

tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py:66: AssertionError
=============================== warnings summary ===============================
../../../../../../../Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/overlays/starlette-0.50.0-py3-none-any/starlette/testclient.py:45
  /Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/overlays/starlette-0.50.0-py3-none-any/starlette/testclient.py:45: DeprecationWarning: The anyio.abc.BlockingPortal alias is deprecated, use anyio.from_thread.BlockingPortal instead.
    _PortalFactoryType = Callable[[], AbstractContextManager[anyio.abc.BlockingPortal]]

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 2 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
1 failed, 3 passed, 1 warning, 1 error in 0.68s