Update the RBGateway tests to better check HTTP requests and responses.
Review Request #9769 — Created March 13, 2018 and submitted
This updates the RBGateway test suite to make fewer assumptions about
the API requests and results, which were masking some problems, and as
part of a series of cleanups to prepare for better type safety checks.All HTTP requests are now checked for all arguments, ensuring we're
passing all the data we expected (and this helped highlight a flaw in
the unit tests where a hosting account URL was not shown).We now spy on
http_request
and not methods likehttp_post
, which
will allow for future type safety checks to kick in.We also now better check the commits and other information we get back,
ensuring that all the expected data has been parsed from the payload.
Unit tests pass.
- Change Summary:
-
- Updated some function names.
- Changed the
self
argument of_http_request
functions toclient
.
- Commit:
-
923c5bfc824ba12bcfc79749360320bdcdce44139586bc440a1e977cb409bd6400f41ee6864bbdfe
- Diff:
-
Revision 2 (+126 -81)
Checks run (2 succeeded)
- Change Summary:
-
- Made the API request call checks more strict.
- Removed an unused import.
- Commit:
-
9586bc440a1e977cb409bd6400f41ee6864bbdfe50a5c364c84dbd394f98642848aa64e3afdf0641
- Diff:
-
Revision 3 (+145 -81)