Adds unittest for helper.condense_hosts()
Change output format condense_hosts to be the same as the input format