Skip to content

Missing Integration Coverage for Toolforge/Commons sync lifecycles #446

@ayushshukla1807

Description

@ayushshukla1807

Problem:
Testing coverage is currently heavily weighted toward basic SQLAlchemy session fixtures. However, there is zero mock-based coverage for the loaders.py and Wikimedia Commons API sync interactions.

Impact:
If Commons changes its API schema or a category tree redirects, the import_entries function can silently fail or skip files without the CI/CD pipeline catching it.

Proposed Solution:
Introduce pytest-mock or responses fixtures to explicitly mock https://montage.toolforge.org/ and the Wikimedia API. We specifically need integration checks testing how the system handles <redirect> nodes and HTTP 429 Rate Limits during large CSV imports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions