Tests: Fix encoding error with Python 3