Tests: fix use of location
Tests: check response status before parsing

Check the status of responses before parsing them to more quickly
isolate problems (i.e., malformed requests versus malformed responses)
when tests fails.

This changes 12 tests from errors to failures.
Tests: fix more API URLs

Note that while this fixes the URLs, these tests still do not succeed.