Use BytesIO for Python3 post test