Fix tostring()/tobytes() warning and reinstate test