Fix tests

Tests relied on a server listening on 127.0.0.1, port 80 because
of a missing mock. This patch fixes this.