From 50a43141ddac8f65bd61ed836e7476669d56e5fa Mon Sep 17 00:00:00 2001 From: Stephan Jaensch Date: Tue, 27 Oct 2020 09:43:22 +0100 Subject: [PATCH 1/2] With the recent fix in bravado 11.0.2 we can reenable connection error integration tests on Windows --- requirements-dev.txt | 2 +- tests/integration/bravado_integration_test.py | 26 ------------------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index e916b85..9075428 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ aiohttp bottle bravado-core>=4.11.0 -bravado[integration-tests,fido]>=11.0.1 +bravado[integration-tests,fido]>=11.0.2 coverage ephemeral_port_reserve mock<4 diff --git a/tests/integration/bravado_integration_test.py b/tests/integration/bravado_integration_test.py index 9157a4f..0100a24 100644 --- a/tests/integration/bravado_integration_test.py +++ b/tests/integration/bravado_integration_test.py @@ -1,5 +1,3 @@ -import sys - import aiohttp.client_exceptions import pytest from bravado.testing.integration_test import IntegrationTestsBaseClass @@ -38,27 +36,3 @@ def test_request_timeout_errors_are_thrown_as_BravadoTimeoutError( self, swagger_http_server ): # pragma: no cover pass - - @pytest.mark.skipif( - sys.platform == "win32", - reason="Test does not throw correct exception type on Windows", - ) - def test_connection_errors_are_thrown_as_BravadoConnectionError( - self, not_answering_http_server - ): # pragma: no cover - return super().test_connection_errors_are_thrown_as_BravadoConnectionError( - not_answering_http_server - ) - - @pytest.mark.skipif( - sys.platform == "win32", - reason="Test does not throw correct exception type on Windows", - ) - def test_swagger_client_connection_errors_are_thrown_as_BravadoConnectionError( - self, not_answering_http_server, swagger_client, result_getter, - ): # pragma: no cover - return super().test_swagger_client_connection_errors_are_thrown_as_BravadoConnectionError( - not_answering_http_server=not_answering_http_server, - swagger_client=swagger_client, - result_getter=result_getter, - ) From d69cd234a6a5bb104b7c4d46dec01053560668d1 Mon Sep 17 00:00:00 2001 From: Stephan Jaensch Date: Tue, 27 Oct 2020 10:04:21 +0100 Subject: [PATCH 2/2] Fix build on Python 3.6 --- bravado_asyncio/response_adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bravado_asyncio/response_adapter.py b/bravado_asyncio/response_adapter.py index 9774086..06e3f8a 100644 --- a/bravado_asyncio/response_adapter.py +++ b/bravado_asyncio/response_adapter.py @@ -46,7 +46,7 @@ def reason(self) -> str: ) # aiohttp 3.4.0 doesn't annotate this attribute correctly @property - def headers(self) -> CIMultiDictProxy[str]: + def headers(self) -> CIMultiDictProxy: return self._delegate.headers def json(self, **_: Any) -> Dict[str, Any]: