Skip to content

Commit c60e773

Browse files
author
Peter Uittenbroek
committed
fix mypy issues and test_sqlalchemy
1 parent eaaadbb commit c60e773

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/integrations/sqlalchemy/test_sqlalchemy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
from sqlalchemy.orm import relationship, sessionmaker
88

99
from sentry_sdk import capture_message, start_transaction, configure_scope
10-
from sentry_sdk.consts import SPANDATA
10+
from sentry_sdk.consts import DEFAULT_MAX_STRING_LENGTH, SPANDATA
1111
from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration
1212
from sentry_sdk.serializer import MAX_EVENT_BYTES
13-
from sentry_sdk.utils import json_dumps, MAX_STRING_LENGTH
13+
from sentry_sdk.utils import json_dumps
1414

1515

1616
def test_orm_queries(sentry_init, capture_events):
@@ -167,7 +167,7 @@ def test_large_event_not_truncated(sentry_init, capture_events):
167167
)
168168
events = capture_events()
169169

170-
long_str = "x" * (MAX_STRING_LENGTH + 10)
170+
long_str = "x" * (DEFAULT_MAX_STRING_LENGTH + 10)
171171

172172
with configure_scope() as scope:
173173

@@ -201,7 +201,7 @@ def processor(event, hint):
201201
assert description.endswith("SELECT 98 UNION SELECT 99")
202202

203203
# Smoke check that truncation of other fields has not changed.
204-
assert len(event["message"]) == MAX_STRING_LENGTH
204+
assert len(event["message"]) == DEFAULT_MAX_STRING_LENGTH
205205

206206
# The _meta for other truncated fields should be there as well.
207207
assert event["_meta"]["message"] == {

0 commit comments

Comments
 (0)