From b3d6215d2bafb3d9d8a92d49d50d965e44d7a8f2 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Mon, 18 Nov 2013 12:40:27 +0100 Subject: [PATCH] fix unittest for werkzeug==0.8 --- specs/test_guard.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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):