From 7c0b88ab4df1a1fdab24d4c69e414430c7a5de22 Mon Sep 17 00:00:00 2001 From: Cagri Yonca Date: Fri, 2 May 2025 14:46:16 +0200 Subject: [PATCH] fix: change request url for urllib Signed-off-by: Cagri Yonca --- tests/clients/test_urllib3.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/clients/test_urllib3.py b/tests/clients/test_urllib3.py index 642edd9a..62b07d49 100644 --- a/tests/clients/test_urllib3.py +++ b/tests/clients/test_urllib3.py @@ -82,7 +82,7 @@ def make_request(u=None) -> int: threadpool_size = 15 pool = ThreadPool(processes=threadpool_size) - res = pool.map(make_request, [u for u in range(threadpool_size)]) + _ = pool.map(make_request, [u for u in range(threadpool_size)]) # print(f'requests made within threadpool, instana does not instrument - statuses: {res}') spans = self.recorder.queued_spans() @@ -137,7 +137,7 @@ def test_get_request(self): assert len(urllib3_span.stack) > 1 def test_get_request_https(self): - request_url = "https://reqres.in:443/api/users" + request_url = "https://jsonplaceholder.typicode.com:443/todos/1" with tracer.start_as_current_span("test"): r = self.http.request("GET", request_url) @@ -631,7 +631,9 @@ def test_exception_logging(self): assert test_span.data["sdk"]["name"] == "test" assert urllib3_span.n == "urllib3" assert urllib3_span.data["http"]["status"] == 500 - assert urllib3_span.data["http"]["url"] == testenv["flask_server"] + "/exception" + assert ( + urllib3_span.data["http"]["url"] == testenv["flask_server"] + "/exception" + ) assert urllib3_span.data["http"]["method"] == "GET" assert urllib3_span.stack assert isinstance(urllib3_span.stack, list)