Fix the expectation to be byte string for Python 3