Test suite improvements

Don't do HTTP requests in tests.