• 
      

    Fix unit test regressions with badges and conditionally access context.

    Review Request #14368 — Created March 14, 2025 and discarded — Latest diff uploaded

    Information

    Review Board
    release-7.1.x

    Reviewers

    When get_user_badges() was updated to take a local_site= parameter,
    two unit tests failed to get the update. They were caught up in a stash.
    These have been updated to take **kwargs.

    Badge calculation also assumed the existence of request.local_site and
    context['request']`, but these aren't always available, at least in unit
    tests. We now access these conditionally.

    All unit tests pass.

    Commits

    Files