Fix incorrect string types in Jenkins CI on Python 3.
Review Request #11668 — Created June 21, 2021 and submitted
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
urlopen()request stage rather than the building of
the HTTP request. This ensures that
type checks are used.
It also fixes up a few other small issues involving state in the
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.