Skip to content

Commit 0149a6c

Browse files
committed
fix test
1 parent d578715 commit 0149a6c

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

docs-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ redis>=2.6
3636
sqlalchemy>=1.0
3737
tornado>=5.1.1
3838
ddtrace>=0.34.0
39-
httpx~=0.18.0
39+
httpx>=0.18.0

instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def test_requests_timeout_exception(self):
250250
self.assertEqual(span.status.status_code, StatusCode.ERROR)
251251

252252
def test_invalid_url(self):
253-
url = "invalid://nope"
253+
url = "invalid://nope/"
254254

255255
with respx.mock, self.assertRaises(httpx.UnsupportedProtocol):
256256
respx.post("invalid://nope").pass_through()
@@ -259,14 +259,10 @@ def test_invalid_url(self):
259259
span = self.assert_span()
260260

261261
self.assertEqual(span.name, "HTTP POST")
262-
print(span.attributes)
263262
self.assertEqual(
264-
span.attributes,
265-
{
266-
SpanAttributes.HTTP_METHOD: "POST",
267-
SpanAttributes.HTTP_URL: "invalid://nope/",
268-
},
263+
span.attributes[SpanAttributes.HTTP_METHOD], "POST"
269264
)
265+
self.assertEqual(span.attributes[SpanAttributes.HTTP_URL], url)
270266
self.assertEqual(span.status.status_code, StatusCode.ERROR)
271267

272268
def test_if_headers_equals_none(self):

0 commit comments

Comments
 (0)