From feed69bcc7963e18fb0a4d64fa2d0f604a52fb22 Mon Sep 17 00:00:00 2001 From: Rytis Bagdziunas Date: Thu, 20 Jun 2024 19:35:28 +0200 Subject: [PATCH] Upgrade Werkzeug library for testing (#2623) --- .../test-requirements.txt | 2 +- .../tests/pyramid_base_test.py | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt index 3edddf72c..184b03fed 100644 --- a/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt +++ b/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt @@ -17,7 +17,7 @@ translationstring==1.4 typing_extensions==4.9.0 venusian==3.1.0 WebOb==1.8.7 -Werkzeug==0.16.1 +Werkzeug==3.0.3 wrapt==1.16.0 zipp==3.17.0 zope.deprecation==5.0 diff --git a/instrumentation/opentelemetry-instrumentation-pyramid/tests/pyramid_base_test.py b/instrumentation/opentelemetry-instrumentation-pyramid/tests/pyramid_base_test.py index bf2368684..9c177433e 100644 --- a/instrumentation/opentelemetry-instrumentation-pyramid/tests/pyramid_base_test.py +++ b/instrumentation/opentelemetry-instrumentation-pyramid/tests/pyramid_base_test.py @@ -14,12 +14,7 @@ import pyramid.httpexceptions as exc from pyramid.response import Response -from werkzeug.test import Client - -# opentelemetry-instrumentation-pyramid uses werkzeug==0.16.1 which has -# werkzeug.wrappers.BaseResponse. This is not the case for newer versions of -# werkzeug like the one lint uses. -from werkzeug.wrappers import BaseResponse # pylint: disable=no-name-in-module +from werkzeug.test import Client, TestResponse class InstrumentationTest: @@ -77,4 +72,4 @@ class InstrumentationTest: ) # pylint: disable=attribute-defined-outside-init - self.client = Client(config.make_wsgi_app(), BaseResponse) + self.client = Client(config.make_wsgi_app(), TestResponse)