Fix tests for Flask 0.8