Change mock mount in tasks and add test_data.

I accidentally replaced the wrong object in tasks, this made the tasks always
use network requests, which is not what we want most of the time. This patch
fixes that and it also adds the test_data that goes with it.
Add support for raise_for_status.

Make requests_mock emulate raise_for_status. This also made a bug with the
status_code stand out and that has been fixed here as well.
Test all the things.

Dramatically improve testing coverage. This commit also includes some bugfixes
that were discovered by writing these tests.