Fix some tests

These tests were not actually mocking the WAAD server, though I thought
they were. Activating mocking reveals some bugs in the code, fix them.
Use a fake auth server URL in tests

This avoids mistakes where you think the test is moking the URL but it's
actually posting to the real server.