diff --git a/.github/workflows/playwright.yaml b/.github/workflows/playwright.yaml index 57fd8e3f..e6f17d85 100644 --- a/.github/workflows/playwright.yaml +++ b/.github/workflows/playwright.yaml @@ -9,7 +9,7 @@ on: jobs: playwright: name: "Playwright Tests" - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: "Checkout repository" uses: "actions/checkout@v4" diff --git a/piccolo_admin/endpoints.py b/piccolo_admin/endpoints.py index f1872385..6405a070 100644 --- a/piccolo_admin/endpoints.py +++ b/piccolo_admin/endpoints.py @@ -100,13 +100,13 @@ class GroupItem(BaseModel): class GroupedTableNamesResponseModel(BaseModel): - grouped: t.Dict[str, t.List[str]] = Field(default_factory=list) + grouped: t.Dict[str, t.List[str]] = Field(default_factory=dict) ungrouped: t.List[str] = Field(default_factory=list) class GroupedFormsResponseModel(BaseModel): grouped: t.Dict[str, t.List[FormConfigResponseModel]] = Field( - default_factory=list + default_factory=dict ) ungrouped: t.List[FormConfigResponseModel] = Field(default_factory=list) @@ -680,7 +680,7 @@ def __init__( private_app.add_route( path="/change-password/", - route=change_password( + route=change_password( # type: ignore login_url="./../../public/login/", session_table=session_table, read_only=read_only, @@ -786,7 +786,7 @@ def __init__( public_app.add_route( path="/logout/", - route=session_logout(session_table=session_table), + route=session_logout(session_table=session_table), # type: ignore methods=["POST"], ) diff --git a/requirements/test-requirements.txt b/requirements/test-requirements.txt index 3ce95ac8..d63cc378 100644 --- a/requirements/test-requirements.txt +++ b/requirements/test-requirements.txt @@ -4,9 +4,5 @@ flake8==7.0.0 piccolo[postgres,sqlite]>=1.16.0 playwright==1.41.2 pytest-playwright==0.4.4 -httpx>=0.20.0 -# This is needed because newer versions of FastAPI use a Starlette version with -# a `TestClient` which breaks rate limiting. -# The changes to `TestClient` will likely be reverted in a future release, in -# which case we can remove this version pin. -fastapi==0.106.0 +httpx==0.28.1 +fastapi==0.115.6