Fix a regression in URLs in WebHook payloads.

Review Request #11670 — Created June 23, 2021 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

WebHook payloads make use of a custom version of Django's HttpRequest
object to simulate API responses from a request. As part of this, we
attempt to calculate state needed by HttpRequest.build_absolute_uri()
to generate a suitable URL.

This regressed with the move to Django 1.11, as the logic for
determining the scheme (HTTP or HTTPS) for URLs had changed, and our
test coverage didn't check for this.

This change update our version of this object to provide the correct
state, and adds unit tests to ensure this won't regress in the future.
The tests also check to make sure the site domain is reflected in URLs.

Unit tests pass on Python 2 and 3.

Commits

Files

    Loading...