diff --git a/specs/test_guard.py b/specs/test_guard.py index ae76044..12b906d 100644 --- a/specs/test_guard.py +++ b/specs/test_guard.py @@ -2,10 +2,10 @@ import unittest -import os import json import tempfile +from werkzeug import __version__ from werkzeug.test import Client from werkzeug.wrappers import Response @@ -15,6 +15,12 @@ from isso.utils import http from fixtures import curl, FakeIP http.curl = curl +if __version__.startswith("0.8"): + class Response(Response): + + def get_data(self, as_text=False): + return self.data.decode("utf-8") + class TestGuard(unittest.TestCase):