Update the Kiln tests to use the new hosting service test helpers.
Review Request #9770 — Created March 13, 2018 and submitted
This updates the Kiln 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:
-
Updated some function names.
- Commit:
-
e23a410055123c2404cb0eb740fcbe9c3d7c46a656a19bb5a91f008430f210eb1d28c90ba74e7b61
Checks run (2 succeeded)
- Change Summary:
-
Changed the
self
argument of_http_request
functions toclient
. - Commit:
-
56a19bb5a91f008430f210eb1d28c90ba74e7b61b2a2c88467efe30d6811036de67aba389cf507b5
Checks run (2 succeeded)
- Change Summary:
-
Made the URL request checks more strict.
- Commit:
-
b2a2c88467efe30d6811036de67aba389cf507b58e13506658d4712f999b4a3ed77b39a29f4410a3
Checks run (2 succeeded)
- Change Summary:
-
Rebuilt this change to use the new hosting service test architecture.
- Summary:
-
Update the Kiln tests to better check HTTP requests and meet standards.Update the Kiln tests to use the new hosting service test helpers.
- Description:
-
~ This updates the Kiln test suite to check the full contents of any API
~ requests performed, ensuring type safety and that the request data is ~ what we expect. Since Kiln uses HTTP form-data during authorization, the ~ form data generation code needed to be updated to provide a predictable ~ sort order and to break out boundary generation into a new method (which ~ This updates the Kiln 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. - will also be needed later for Python 3 support, since - mimetools.choose_boundary()
is going away).- - We now spy on
http_request
and not methods likehttp_post
, which- will allow for future type safety checks to kick in. - - Docstrings have been updated to meet the modern standard.
- Commit:
-
8e13506658d4712f999b4a3ed77b39a29f4410a3c954495521d07af895721dacd8022eeed0282480
- Diff:
-
Revision 5 (+150 -162)