Update the Unfuddle test suite to check for HTTP request and type info.

Review Request #9763 — Created March 8, 2018 and submitted

Information

Review Board
release-3.0.x
9bc039f...

Reviewers

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
passed to 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.

david
  1. Ship It!
  2. 
      
brennie
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (140d9bd)