gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / python-flask-restful-werkzeug-compat.patch
1 We need one patch on top of 0.3.8 for compatibility with Werkzeug 1.0.
2
3 Taken from upstream:
4 https://github.com/flask-restful/flask-restful/commit/73376a488907af3042b52678ac4c23f8a8911e5b
5
6 diff --git a/tests/test_api.py b/tests/test_api.py
7 index f7f8e661..6795d362 100644
8 --- a/tests/test_api.py
9 +++ b/tests/test_api.py
10 @@ -445,7 +445,9 @@ def test_handle_non_api_error(self):
11
12 resp = app.get("/foo")
13 self.assertEquals(resp.status_code, 404)
14 - self.assertEquals('text/html', resp.headers['Content-Type'])
15 + # in newer versions of werkzeug this is `text/html; charset=utf8`
16 + content_type, _, _ = resp.headers['Content-Type'].partition(';')
17 + self.assertEquals('text/html', content_type)
18
19 def test_non_api_error_404_catchall(self):
20 app = Flask(__name__)
21 diff --git a/tests/test_reqparse.py b/tests/test_reqparse.py
22 index 2f1fbedf..9776f17c 100644
23 --- a/tests/test_reqparse.py
24 +++ b/tests/test_reqparse.py
25 @@ -2,9 +2,9 @@
26 import unittest
27 from mock import Mock, patch
28 from flask import Flask
29 -from werkzeug import exceptions, MultiDict
30 +from werkzeug import exceptions
31 from werkzeug.wrappers import Request
32 -from werkzeug.datastructures import FileStorage
33 +from werkzeug.datastructures import FileStorage, MultiDict
34 from flask_restful.reqparse import Argument, RequestParser, Namespace
35 import six
36 import decimal