• 
      

    Fix no-ops with the @online_only unit test decorator.

    Review Request #14940 — Created March 18, 2026 and updated — Latest diff uploaded

    Information

    Review Board
    release-7.1.x

    Reviewers

    In 2021, the @online_only decorator was rewritten to use
    @simple_decorator, but the result was a function that performed no-ops
    when online. Instead of calling the test function with the provided
    arguments, it just returned the first argument as-is (which was the
    self argument to the unit test class). This got ignored, resulting in
    nothing happening when the test was run.

    This did unveil that one test (Mercurial's HTTPS tests) were no longer
    passing. This was due to the repository having bot protection deployed,
    which meant we were getting HTTP 200 results that weren't actually the
    file contents. We've switched to Mozilla's HG server for our test, which
    currently has no bot protection.

    Unit tests pass.

    Commits

    Files