Add new utilities for hosting service unit tests.
Review Request #9857 — Created April 4, 2018 and submitted
These new utilities make it easier to test HTTP requests and responses
dealing with multiple paths, and simple responses payloads or errors
with custom headers. It does this through a
function that takes in a dictionary of information and returns a method
to pass to
It also adds a
dump_json()method that wraps
returns a bytestring, helping deal with Python 2/3 compatibility.
Used these new methods in upcoming unit tests, which pass.