From 2516d1df402b0860875b28dd9ac1070b934ae07b Mon Sep 17 00:00:00 2001 From: Aaron Harper Date: Fri, 22 Nov 2024 09:59:41 -0500 Subject: [PATCH] Fix test failures --- inngest/_internal/comm_lib/handler.py | 4 ++-- pyproject.toml | 5 +++++ tests/test_introspection/test_digital_ocean.py | 2 +- tests/test_introspection/test_flask.py | 4 ++-- tests/test_probes/test_flask.py | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/inngest/_internal/comm_lib/handler.py b/inngest/_internal/comm_lib/handler.py index 2f8f1127..54681b4b 100644 --- a/inngest/_internal/comm_lib/handler.py +++ b/inngest/_internal/comm_lib/handler.py @@ -362,7 +362,7 @@ async def put( ) -> typing.Union[CommResponse, Exception]: """Handle a PUT request.""" - self._client.logger.info("Syncing app") + self._client.logger.debug("Syncing app") syncer = _Syncer(logger=self._client.logger) if ( @@ -393,7 +393,7 @@ def put_sync( ) -> typing.Union[CommResponse, Exception]: """Handle a PUT request.""" - self._client.logger.info("Syncing app") + self._client.logger.debug("Syncing app") syncer = _Syncer(logger=self._client.logger) if ( diff --git a/pyproject.toml b/pyproject.toml index ff2f244a..424d70cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,11 @@ extra = [ "types-toml==0.10.8.7", "types-tornado==5.1.1", "uvicorn==0.23.2", + + # Werkzeug v3.1 deleted something that breaks our minimum Flask version + # (v2.3.0). So for now, only allow Werkzeug versions below v3.1. See this PR + # for the deleted thing: https://github.com/pallets/werkzeug/pull/2967 + "werkzeug<3.1", ] [project.urls] diff --git a/tests/test_introspection/test_digital_ocean.py b/tests/test_introspection/test_digital_ocean.py index 076a2904..167b35c5 100644 --- a/tests/test_introspection/test_digital_ocean.py +++ b/tests/test_introspection/test_digital_ocean.py @@ -69,7 +69,7 @@ def test_cloud_mode_with_signature(self) -> None: assert isinstance( net.validate_response_sig( body=res.get_data(), - headers=res.headers, + headers={k: v for k, v in res.headers}, mode=server_lib.ServerKind.CLOUD, signing_key=self.signing_key, ), diff --git a/tests/test_introspection/test_flask.py b/tests/test_introspection/test_flask.py index 4c636327..d2f258ac 100644 --- a/tests/test_introspection/test_flask.py +++ b/tests/test_introspection/test_flask.py @@ -76,7 +76,7 @@ def test_cloud_mode_with_signature(self) -> None: assert isinstance( net.validate_response_sig( body=res.get_data(), - headers=res.headers, + headers={k: v for k, v in res.headers}, mode=server_lib.ServerKind.CLOUD, signing_key=self.signing_key, ), @@ -115,7 +115,7 @@ def test_cloud_mode_with_signature_fallback(self) -> None: assert isinstance( net.validate_response_sig( body=res.get_data(), - headers=res.headers, + headers={k: v for k, v in res.headers}, mode=server_lib.ServerKind.CLOUD, signing_key=signing_key_fallback, ), diff --git a/tests/test_probes/test_flask.py b/tests/test_probes/test_flask.py index 4cd52704..993a1c41 100644 --- a/tests/test_probes/test_flask.py +++ b/tests/test_probes/test_flask.py @@ -46,7 +46,7 @@ def test_signed(self) -> None: assert isinstance( net.validate_response_sig( body=res.get_data(), - headers=res.headers, + headers={k: v for k, v in res.headers}, mode=server_lib.ServerKind.CLOUD, signing_key=self.signing_key, ),