|
7 | 7 | from sqlalchemy.orm import relationship, sessionmaker
|
8 | 8 |
|
9 | 9 | 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 |
11 | 11 | from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration
|
12 | 12 | 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 |
14 | 14 |
|
15 | 15 |
|
16 | 16 | def test_orm_queries(sentry_init, capture_events):
|
@@ -167,7 +167,7 @@ def test_large_event_not_truncated(sentry_init, capture_events):
|
167 | 167 | )
|
168 | 168 | events = capture_events()
|
169 | 169 |
|
170 |
| - long_str = "x" * (MAX_STRING_LENGTH + 10) |
| 170 | + long_str = "x" * (DEFAULT_MAX_STRING_LENGTH + 10) |
171 | 171 |
|
172 | 172 | with configure_scope() as scope:
|
173 | 173 |
|
@@ -201,7 +201,7 @@ def processor(event, hint):
|
201 | 201 | assert description.endswith("SELECT 98 UNION SELECT 99")
|
202 | 202 |
|
203 | 203 | # 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 |
205 | 205 |
|
206 | 206 | # The _meta for other truncated fields should be there as well.
|
207 | 207 | assert event["_meta"]["message"] == {
|
|
0 commit comments