Convert hosts tests to httpretty

Change-Id: Ib1cdb508ef04a86350d3890c14e181b6ed1177f2
blueprint: httpretty-testing
Merge "Convert hosts tests to httpretty"