Update the Unfuddle test suite to check for HTTP request and type info.
Review Request #9763 — Created March 8, 2018 and submitted
This is the first in a series of changes to improve type safety and
enhance tests for the hosting services suite. We begin with Unfuddle.
This change updates the Unfuddle test suite to always return byte
strings for payloads and to check for byte results. We no longer spy on
_http_get(), but rather on
http_request(), which will be wrapped in
an upcoming change to check result types.
When checking the results of the spies, we now check all arguments
http_request(), rather than just checking if it was called.
This allows us to ensure we're passing exactly what we expect in the
calls, and to check for type safety (on Python 3) at the same time.
Docstrings have been updated to better mention function names, helping
match other test suites, and docstrings for helper functions have been
added as well.
Unit tests pass. This has also been tested against Python 3 on the
Review Board 4.0 branch, in combination with other changes.