Make remote API unit tests easier to read and write

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Merge pull request #5102 from shykes/api-cleanup-tests

Make remote API unit tests easier to read and write