use local httptest.NewServer() for testing

hi,

just as an inspiration, you might want to look at `net/http/httptest`, it's quite easy to create local test servers with it. Cuts down on test time and doesn't require a network connection.