Remove localhost references from tests

Using localhost in dummy URLs is a bad idea, because if you get
your mocking slightly wrong, some tests try to connect to the
services running in your local test environment.

Change-Id: I5550c397230f94740c63e6cab30ac35b3ae85297