Skip to content

Fix the failing dashboard tests in learn (mock rows lack the new description column) #1125

Description

@A1L13N

Context

api_dashboard (learn/src/worker.py ~line 3330) now selects and decrypts a.description for hosted and joined activities (desc = await decrypt_aes(r.description or "", enc)). The MockRow fixtures in learn/tests/test_api_join_dashboard.py (test_hosted_activities_returned ~line 188 and test_joined_activities_returned ~line 206) were not updated, so both fail with AttributeError: 'MockRow' object has no attribute 'description'. Run the suite with cd learn && pip install pytest pytest-asyncio && python -m pytest -q (no Cloudflare account needed; tests/conftest.py stubs the Workers runtime).

What to do

  • Add the missing columns (at least description, slug) to the dashboard MockRow fixtures.
  • Assert that the dashboard response includes the decrypted description for hosted and joined activities.
  • Check whether any other column read in api_dashboard is missing from the mocks.

Acceptance criteria

  • tests/test_api_join_dashboard.py passes in full.
  • At least one new assertion covers the description field in the response.

Files

  • learn/tests/test_api_join_dashboard.py
  • learn/tests/helpers.py (MockRow)
  • learn/src/worker.py (api_dashboard)

Helpful links

Part of GSoC 2027 onboarding — see https://gsoc.alphaonelabs.com

Activity

  1. added
    good first issue
    project: learn
    gsoc-2027
    on Nov 2, 2026
  2. github-actions commented on Nov 2, 2026

    @github-actions
  3. reopened this on Nov 2, 2026
  4. added
    2026-11
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    2026-11good first issuegsoc-2027project: learntests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions