File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
tests/integrations/cloud_resource_context Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
import json
2
- import urllib3 # type: ignore
2
+ import urllib3
3
3
4
4
from sentry_sdk .integrations import Integration
5
5
from sentry_sdk .api import set_context
@@ -80,7 +80,7 @@ def _is_aws(cls):
80
80
if r .status != 200 :
81
81
return False
82
82
83
- cls .aws_token = r .data
83
+ cls .aws_token = r .data . decode ()
84
84
return True
85
85
86
86
except Exception :
Original file line number Diff line number Diff line change 26
26
from sentry_sdk .utils import Dsn
27
27
from sentry_sdk ._types import TYPE_CHECKING
28
28
29
- from urllib3 .util import parse_url as urlparse # type: ignore
29
+ from urllib3 .util import parse_url as urlparse
30
30
31
31
if TYPE_CHECKING :
32
32
from typing import Any
Original file line number Diff line number Diff line change 1
1
from __future__ import print_function
2
2
3
3
import io
4
- import urllib3 # type: ignore
4
+ import urllib3
5
5
import certifi
6
6
import gzip
7
7
import time
26
26
from typing import Union
27
27
from typing import DefaultDict
28
28
29
- from urllib3 .poolmanager import PoolManager # type: ignore
29
+ from urllib3 .poolmanager import PoolManager
30
30
from urllib3 .poolmanager import ProxyManager
31
31
32
32
from sentry_sdk ._types import Event , EndpointType
@@ -186,7 +186,7 @@ def record_lost_event(
186
186
self ._discarded_events [data_category , reason ] += quantity
187
187
188
188
def _update_rate_limits (self , response ):
189
- # type: (urllib3.HTTPResponse ) -> None
189
+ # type: (urllib3.BaseHTTPResponse ) -> None
190
190
191
191
# new sentries with more rate limit insights. We honor this header
192
192
# no matter of the status code to update our internal rate limits.
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ def test_is_aws_ok():
136
136
CloudResourceContextIntegration .http .request = MagicMock (return_value = response )
137
137
138
138
assert CloudResourceContextIntegration ._is_aws () is True
139
- assert CloudResourceContextIntegration .aws_token == b "something"
139
+ assert CloudResourceContextIntegration .aws_token == "something"
140
140
141
141
CloudResourceContextIntegration .http .request = MagicMock (
142
142
side_effect = Exception ("Test" )
You can’t perform that action at this time.
0 commit comments