8000 fix: Fix test breaking due to httpbin changes · etherscan-io/sentry-python@65890e1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 65890e1

Browse files
committed
fix: Fix test breaking due to httpbin changes
postmanlabs/httpbin#533
1 parent 9fac9ef commit 65890e1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/integrations/stdlib/test_httplib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from urllib import urlopen
77

88
try:
9-
from httplib import HTTPConnection
9+
from httplib import HTTPSConnection
1010
except ImportError:
11-
from http.client import HTTPConnection
11+
from http.client import HTTPSConnection
1212

1313
from sentry_sdk import capture_message
1414
from sentry_sdk.integrations.stdlib import StdlibIntegration
@@ -77,7 +77,7 @@ def test_httplib_misuse(sentry_init, capture_events):
7777
sentry_init()
7878
events = capture_events()
7979

80-
conn = HTTPConnection("httpbin.org", 80)
80+
conn = HTTPSConnection("httpbin.org", 443)
8181
conn.request("GET", "/anything/foo")
8282

8383
with pytest.raises(Exception):
@@ -98,7 +98,7 @@ def test_httplib_misuse(sentry_init, capture_events):
9898
assert crumb["type"] == "http"
9999
assert crumb["category"] == "httplib"
100100
assert crumb["data"] == {
101-
"url": "http://httpbin.org/anything/foo",
101+
"url": "https://httpbin.org/anything/foo",
102102
"method": "GET",
103103
"status_code": 200,
104104
"reason": "OK",

0 commit comments

Comments
 (0)
0