Fix regressions in the rbintegrations test suites.
Review Request #11198 — Created Sept. 23, 2020 and submitted
Some recent changes broke a few of the rbintegrations tests. These
affected CircleCI, Travis CI, Slack, and Mattermost.
The CircleCI and Travis CI tests attempt an authorization on GitHub, but
the changes to move to token-based authentication resulted in some
changes to the HTTP methods performed to the GitHub API. The unit tests
weren't spying on the new methods, causing our tests to hit the API and
fail. Now, we spy on both methods, allowing compatibility with a larger
range of Review Board versions.
They've also been updated to provide two versions of the HTTP headers,
in order to fix address case normalization issues.
Travis CI got some fixes for reloading models. Newer unit tests added
refresh_from_db(), which isn't available for Review Board 3.0.
Slack and Mattermost were both creating a review request, changing the
ID, and then saving, which wasn't particularly safe, and led to some
RelationCounterFieldin a test. We now set the ID when
creating the review requests.
Unit tests pass for Review Board 3.0. Some work is still required for
4.0, which will be fixed separately.
See my comment on Hailan's change--the capitalization seems to be dependent on Python version, not Review Board version.
Removed the Review Board 4.0 variations of HTTP headers, since it won't be relevant with /r/11199 and /r/11200.
Revision 2 (+68 -24)
Checks run (2 succeeded)