Fix incorrect string types in Jenkins CI on Python 3.

Review Request #11668 — Created June 21, 2021 and submitted — Latest diff uploaded

Information

rbintegrations
release-2.0.x

Reviewers

The Jenkins CI code was passing an invalid request payload string type
when performing an HTTP request. This was a problem on Python 3, and
unfortunately our test coverage mocked out the code that checked for it.

This change fixes the string types, and enhances our test code to spy on
the lower-level urlopen() request stage rather than the building of
the HTTP request. This ensures that HostingServiceHTTPRequest's string
type checks are used.

It also fixes up a few other small issues involving state in the
implementation of JenkinsAPI.

Unit tests have also been cleaned up (as they weren't meeting our
standards) and fleshed out to provide better coverage.

Unit tests pass on Review Board 3.0 on Python 2.7, and 4.0 on 2.7 and 3.x.

Commits

Files

    Loading...