Skip to content

Commit c78cafb

Browse files
committed
Remove use of httpbin
This is done in order to prevent confusion. We are trying to stop using httpbin.org for our tests. Even when the tests for the requests instrumentation do not actually perform any request to httpbin.org, because the test requests are being mocked with httpretty, having the string httpbin.org in the tests can cause confusion and make the reader think the tests are actually using httpbin.org. Fixes open-telemetry#1844
1 parent 2edcc21 commit c78cafb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class RequestsIntegrationTestBase(abc.ABC):
6363
# pylint: disable=no-member
6464
# pylint: disable=too-many-public-methods
6565

66-
URL = "http://httpbin.org/status/200"
66+
URL = "http://mock/status/200"
6767

6868
# pylint: disable=invalid-name
6969
def setUp(self):
@@ -152,7 +152,7 @@ def response_hook(span, request_obj, response):
152152
self.assertEqual(span.attributes["response_hook_attr"], "value")
153153

154154
def test_excluded_urls_explicit(self):
155-
url_404 = "http://httpbin.org/status/404"
155+
url_404 = "http://mock/status/404"
156156
httpretty.register_uri(
157157
httpretty.GET,
158158
url_404,
@@ -194,7 +194,7 @@ def name_callback(method, url):
194194
self.assertEqual(span.name, "HTTP GET")
195195

196196
def test_not_foundbasic(self):
197-
url_404 = "http://httpbin.org/status/404"
197+
url_404 = "http://mock/status/404"
198198
httpretty.register_uri(
199199
httpretty.GET,
200200
url_404,
@@ -460,7 +460,7 @@ def perform_request(url: str, session: requests.Session = None):
460460
return session.get(url)
461461

462462
def test_credential_removal(self):
463-
new_url = "http://username:password@httpbin.org/status/200"
463+
new_url = "http://username:password@mock/status/200"
464464
self.perform_request(new_url)
465465
span = self.assert_span()
466466

0 commit comments

Comments
 (0)