Refactored test_hostname into a function