Fix test with StringIO.