test: fixing nits

Should not use localhost.
Use toString method to get string representation of buffer.