factor http tests out of the module