Refactored api_server TXT record lookup test