Update the Gerrit tests to use the new hosting service test helpers.
Review Request #9775 — Created March 14, 2018 and submitted
This updates the Gerrit test suite to use the new helpers for hosting
service unit tests, which provide better, more consistent checks with
simpler code. The results of all HTTP requests are checked, ensuring
we're calling what we expect and that behavior doesn't change in the
future.
Unit tests pass.
- Change Summary:
-
Rebuilt this change to use the new hosting service test architecture.
- Summary:
-
Update the Gerrit tests for better checks and to fix bad data/strings.Update the Gerrit tests to use the new hosting service test helpers.
- Description:
-
~ This updates the Gerrit test suite to check all the HTTP requests
~ performed, ensuring that we're calling each API we expect with the ~ correct data in the correct order, and to ensure that payloads are sent ~ as bytes and not Unicode strings. ~ ~ This updates the Gerrit test suite to use the new helpers for hosting
~ service unit tests, which provide better, more consistent checks with ~ simpler code. The results of all HTTP requests are checked, ensuring ~ we're calling what we expect and that behavior doesn't change in the ~ future. - This uncovered problems where we were using
ugettext_lazy
for some- exceptions in Gerrit, and a problem in the authorize tests where the - wrong credentials were being provided. These have been fixed. - - Various other small changes have been made that will help Python 3
- compatibility and consistency with other test suites. - Commit:
-
7228bc9445eadc8206e2f02bf0cddb6bd58501dd678d883d73418c32dd9e6ee008afa80fbd9bf669
- Diff:
-
Revision 2 (+270 -232)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.