fix unittest for werkzeug==0.8
This commit is contained in:
parent
c2a0331dbd
commit
b3d6215d2b
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import os
|
|
||||||
import json
|
import json
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
from werkzeug import __version__
|
||||||
from werkzeug.test import Client
|
from werkzeug.test import Client
|
||||||
from werkzeug.wrappers import Response
|
from werkzeug.wrappers import Response
|
||||||
|
|
||||||
@ -15,6 +15,12 @@ from isso.utils import http
|
|||||||
from fixtures import curl, FakeIP
|
from fixtures import curl, FakeIP
|
||||||
http.curl = curl
|
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):
|
class TestGuard(unittest.TestCase):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user