Skip to content

Commit 6538067

Browse files
♻️ typing
1 parent 47e7925 commit 6538067

File tree

1 file changed

+51
-58
lines changed

1 file changed

+51
-58
lines changed

tests/sentry/replays/lib/test_summarize.py

Lines changed: 51 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -198,66 +198,61 @@ def test_as_log_message_click() -> None:
198198

199199

200200
def test_as_log_message_lcp() -> None:
201-
event = (
202-
{
203-
"type": 5,
204-
"timestamp": 1756400489.048,
205-
"data": {
206-
"tag": "performanceSpan",
207-
"payload": {
208-
"op": "web-vital",
209-
"description": "largest-contentful-paint",
210-
"startTimestamp": 1756400489.048,
211-
"endTimestamp": 1756400489.048,
212-
"data": {"value": 623, "size": 623, "rating": "good"},
213-
},
201+
event = {
202+
"type": 5,
203+
"timestamp": 1756400489.048,
204+
"data": {
205+
"tag": "performanceSpan",
206+
"payload": {
207+
"op": "web-vital",
208+
"description": "largest-contentful-paint",
209+
"startTimestamp": 1756400489.048,
210+
"endTimestamp": 1756400489.048,
211+
"data": {"value": 623, "size": 623, "rating": "good"},
214212
},
215213
},
216-
)
214+
}
215+
217216
assert (
218217
as_log_message(event)
219-
== "Application largest contentful paint: 623 ms and has a good rating at 1756400489048"
218+
== "Application largest contentful paint: 623 ms and has a good rating at 1756400489048.0"
220219
)
221220

222221

223222
def test_as_log_message_navigation() -> None:
224-
event = (
225-
{
226-
"type": 5,
227-
"timestamp": 1756400579304,
228-
"data": {
229-
"tag": "breadcrumb",
230-
"payload": {
231-
"timestamp": 1756400579.304,
232-
"type": "default",
233-
"category": "navigation",
234-
"data": {
235-
"from": "https://url-example-previous.com",
236-
"to": "https://url-example.com",
237-
},
223+
event = {
224+
"type": 5,
225+
"timestamp": 1756400579304,
226+
"data": {
227+
"tag": "breadcrumb",
228+
"payload": {
229+
"timestamp": 1756400579.304,
230+
"type": "default",
231+
"category": "navigation",
232+
"data": {
233+
"from": "https://url-example-previous.com",
234+
"to": "https://url-example.com",
238235
},
239236
},
240237
},
241-
)
238+
}
242239
assert as_log_message(event) is None
243240

244241

245242
def test_as_log_message_feedback() -> None:
246-
event = (
247-
{
248-
"type": 5,
249-
"timestamp": 1756400970768,
250-
"data": {
251-
"tag": "breadcrumb",
252-
"payload": {
253-
"timestamp": 1756400970.768,
254-
"type": "default",
255-
"category": "sentry.feedback",
256-
"data": {"feedbackId": "332f05068b2d43e6b5c5557ffecfcd0f"},
257-
},
243+
event = {
244+
"type": 5,
245+
"timestamp": 1756400970768,
246+
"data": {
247+
"tag": "breadcrumb",
248+
"payload": {
249+
"timestamp": 1756400970.768,
250+
"type": "default",
251+
"category": "sentry.feedback",
252+
"data": {"feedbackId": "332f05068b2d43e6b5c5557ffecfcd0f"},
258253
},
259254
},
260-
)
255+
}
261256
assert as_log_message(event) is None
262257

263258

@@ -327,23 +322,21 @@ def test_as_log_message_resource_script() -> None:
327322

328323

329324
def test_as_log_message_navigation_span() -> None:
330-
event = (
331-
{
332-
"type": 5,
333-
"timestamp": 1756400579.304,
334-
"data": {
335-
"tag": "performanceSpan",
336-
"payload": {
337-
"op": "navigation.push",
338-
"description": "https://url-example.com",
339-
"startTimestamp": 1756400579.304,
340-
"endTimestamp": 1756400579.304,
341-
"data": {"previous": "https://url-example-prev.com"},
342-
},
325+
event = {
326+
"type": 5,
327+
"timestamp": 1756400579.304,
328+
"data": {
329+
"tag": "performanceSpan",
330+
"payload": {
331+
"op": "navigation.push",
332+
"description": "https://url-example.com",
333+
"startTimestamp": 1756400579.304,
334+
"endTimestamp": 1756400579.304,
335+
"data": {"previous": "https://url-example-prev.com"},
343336
},
344337
},
345-
)
346-
assert as_log_message(event) == "User navigated to: https://url-example.com at 1756400579304"
338+
}
339+
assert as_log_message(event) == "User navigated to: https://url-example.com at 1756400579304.0"
347340

348341

349342
def test_as_log_message_long_console_message() -> None:

0 commit comments

Comments
 (0)