Make 'buffer' strings explicitly bytestrings in validator tests

for python 3 compatibility.