Fix a test failure on py3k with encoded bytes