File tree 2 files changed +4
-8
lines changed
instrumentation/opentelemetry-instrumentation-httpx/tests
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -36,4 +36,4 @@ redis>=2.6
36
36
sqlalchemy>=1.0
37
37
tornado>=5.1.1
38
38
ddtrace>=0.34.0
39
- httpx~ =0.18.0
39
+ httpx> =0.18.0
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ def test_requests_timeout_exception(self):
250
250
self .assertEqual (span .status .status_code , StatusCode .ERROR )
251
251
252
252
def test_invalid_url (self ):
253
- url = "invalid://nope"
253
+ url = "invalid://nope/ "
254
254
255
255
with respx .mock , self .assertRaises (httpx .UnsupportedProtocol ):
256
256
respx .post ("invalid://nope" ).pass_through ()
@@ -259,14 +259,10 @@ def test_invalid_url(self):
259
259
span = self .assert_span ()
260
260
261
261
self .assertEqual (span .name , "HTTP POST" )
262
- print (span .attributes )
263
262
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"
269
264
)
265
+ self .assertEqual (span .attributes [SpanAttributes .HTTP_URL ], url )
270
266
self .assertEqual (span .status .status_code , StatusCode .ERROR )
271
267
272
268
def test_if_headers_equals_none (self ):
You can’t perform that action at this time.
0 commit comments