From ae61d68de112331e6a745d9e1746dffcfb561c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 22 Apr 2022 18:32:25 +0200 Subject: [PATCH] Always use a Response wrapper when using testing client This normalize the behavior through different versions of werkzeug. issue11353 review385001002 --- trytond/tests/test_wsgi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trytond/tests/test_wsgi.py b/trytond/tests/test_wsgi.py index 0217279882..a8fef38542 100644 --- a/trytond/tests/test_wsgi.py +++ b/trytond/tests/test_wsgi.py @@ -34,7 +34,7 @@ class WSGIAppTestCase(unittest.TestCase): sentinel.request = request raise exception - client = Client(app) + client = Client(app, Response) _ = client.get('/willfail') spy.assert_called_once_with(app, sentinel.request, exception) @@ -60,7 +60,7 @@ class WSGIAppTestCase(unittest.TestCase): sentinel.request = request raise exception - client = Client(app) + client = Client(app, Response) _ = client.get('/willfail') spy1.assert_called_once_with(app, sentinel.request, exception) @@ -84,7 +84,7 @@ class WSGIAppTestCase(unittest.TestCase): sentinel.request = request raise exception - client = Client(app) + client = Client(app, Response) _ = client.get('/willfail') spy.assert_called_once_with(app, sentinel.request, exception) @@ -105,7 +105,7 @@ class WSGIAppTestCase(unittest.TestCase): def _route(request): raise self.TestException('foo') - client = Client(app) + client = Client(app, Response) response = client.get('/willfail') self.assertEqual(next(response.response), b'baz')