46
46
class RequestsIntegrationTestBase (abc .ABC ):
47
47
# pylint: disable=no-member
48
48
49
- URL = "http://httpbin.org /status/200"
50
- URL_TIMEOUT = "http://httpbin.org /timeout/0"
51
- URL_EXCEPTION = "http://httpbin.org /exception/0"
49
+ URL = "http://mock /status/200"
50
+ URL_TIMEOUT = "http://mock /timeout/0"
51
+ URL_EXCEPTION = "http://mock /exception/0"
52
52
53
53
# pylint: disable=invalid-name
54
54
def setUp (self ):
@@ -83,7 +83,7 @@ def setUp(self):
83
83
)
84
84
httpretty .register_uri (
85
85
httpretty .GET ,
86
- "http://httpbin.org /status/500" ,
86
+ "http://mock /status/500" ,
87
87
status = 500 ,
88
88
)
89
89
@@ -142,7 +142,7 @@ def test_basic(self):
142
142
)
143
143
144
144
def test_excluded_urls_explicit (self ):
145
- url_201 = "http://httpbin.org /status/201"
145
+ url_201 = "http://mock /status/201"
146
146
httpretty .register_uri (
147
147
httpretty .GET ,
148
148
url_201 ,
@@ -172,7 +172,7 @@ def test_excluded_urls_from_env(self):
172
172
self .assert_span (num_spans = 1 )
173
173
174
174
def test_not_foundbasic (self ):
175
- url_404 = "http://httpbin.org /status/404/"
175
+ url_404 = "http://mock /status/404/"
176
176
httpretty .register_uri (
177
177
httpretty .GET ,
178
178
url_404 ,
@@ -336,14 +336,14 @@ def test_custom_tracer_provider(self):
336
336
337
337
def test_requests_exception_with_response (self , * _ , ** __ ):
338
338
with self .assertRaises (HTTPError ):
339
- self .perform_request ("http://httpbin.org /status/500" )
339
+ self .perform_request ("http://mock /status/500" )
340
340
341
341
span = self .assert_span ()
342
342
self .assertEqual (
343
343
dict (span .attributes ),
344
344
{
345
345
SpanAttributes .HTTP_METHOD : "GET" ,
346
- SpanAttributes .HTTP_URL : "http://httpbin.org /status/500" ,
346
+ SpanAttributes .HTTP_URL : "http://mock /status/500" ,
347
347
SpanAttributes .HTTP_STATUS_CODE : 500 ,
348
348
},
349
349
)
@@ -365,7 +365,7 @@ def test_requests_timeout_exception(self, *_, **__):
365
365
self .assertEqual (span .status .status_code , StatusCode .ERROR )
366
366
367
367
def test_credential_removal (self ):
368
- url = "http://username:password@httpbin.org /status/200"
368
+ url = "http://username:password@mock /status/200"
369
369
370
370
with self .assertRaises (Exception ):
371
371
self .perform_request (url )
0 commit comments