Fix 'localhost' reference in tests