Fix incorrect string types in Jenkins CI on Python 3.

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

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.

Summary ID
Fix incorrect string types in Jenkins CI on Python 3.
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. Unit tests have also been cleaned up (as they weren't meeting our standards) and fleshed out to provide better coverage.
e602d42c6016d11a5c281c995ad7fd938794c0e3
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (8f8287e)