Simplify and fix tests for `salt.modules.hosts`.