refactored HTTP tests to improve readability

however, the lengthy list of imports suggest that the testsuite module might be
decomposed into separate modules