From 110571aa0a528cb79fde8646f02bf0ef55979b50 Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Tue, 20 Feb 2024 13:50:28 +0000 Subject: [PATCH] linting --- .../tests/test_fastapi_instrumentation.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py b/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py index 465e9d22c8..1b1c50c65e 100644 --- a/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py +++ b/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py @@ -695,6 +695,7 @@ def test_http_custom_response_headers_not_in_span_attributes(self): class TestHTTPAppWithCustomHeadersParameters(TestBase): """Minimal tests here since the behavior of this logic is tested above and in the ASGI tests.""" + def setUp(self): super().setUp() self.app = self._create_app() @@ -702,7 +703,7 @@ def setUp(self): self.app, http_capture_headers_server_request=["a.*", "b.*"], http_capture_headers_server_response=["c.*", "d.*"], - http_capture_headers_sanitize_fields=[".*secret.*"] + http_capture_headers_sanitize_fields=[".*secret.*"], ) self.client = TestClient(self.app) @@ -728,9 +729,14 @@ async def _(): return app def test_http_custom_request_headers_in_span_attributes(self): - resp = self.client.get("/foobar", headers={ - "apple": "red", "banana-secret": "yellow", "fig": "green" - }) + resp = self.client.get( + "/foobar", + headers={ + "apple": "red", + "banana-secret": "yellow", + "fig": "green", + }, + ) self.assertEqual(200, resp.status_code) span_list = self.memory_exporter.get_finished_spans() self.assertEqual(len(span_list), 3)