tests: Fix flask server under Python 3